Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Wildcard search by selecting keyword from table column

Keen2LearnJul 1 2011 — edited Jul 1 2011
Hi Everybody,
I am working on selecting wildcard search by selecting keyword from one table and updating some column in other table.
E.g:
I have two tables: KEY & MATCH

Table KEY has two columns:

WORD PERSON
________________________
An Apple Mac
A City David
A Cell John

Table MATCH has two columns: STMT & OWNER

STMT OWNER
________________________________________
There is An Apple here OWNER1
There is a city nearby OWNER2
Is this a cell or not? OWNER3
Is this not an apple to eat? OWNER4


I need to have an sp which will select WORD from table KEY and search for that pattern in column STMT in table MATCH and if pattern is found and it has to update OWNER of MATCH table as PERSON from KEY table, respective to WORD.
I cant hardcode the WORD to fing in STMT, as there are number of columns in KEY table in real and moreover, KEY column may keep on increasing in future and if we hardcode, it will need changes in sp too.

Please help me in this situation.

I will really appreciate your comments and answers. Thank you very much.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 29 2011
Added on Jul 1 2011
28 comments
689 views