table ddl:
CREATE TABLE bldg_table (
building_code VARCHAR2(100),
building_desc VARCHAR2(600)
);
Table Data:
INSERT INTO BLDG_TABLE (BUILDING_CODE, BUILDING_DESC) VALUES ('01', 'empire state building 824');
INSERT INTO BLDG_TABLE (BUILDING_CODE, BUILDING_DESC) VALUES ('02', 'empire state building 644');
I'm stuck in trying to write a query that would contain multiple parts of my description.
For example I would like to query my bldg_table and retrieve the column based on matching multiple parts of a given string.
so for example.
SELECT
building_code,
building_desc
FROM
bldg_table
where building_desc like ('%empire 824%');
This will not return building code 1
however this will
SELECT
building_code,
building_desc
FROM
bldg_table
where building_desc like ('%824%');
This is part of a much bigger application but the problem I'm trying to solve is simply match mutiple parts of the search string in order to retrieve a column and I'm failing miserably.
Can someone point me in the right direction?