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!

Exclude Words

DaveyBJul 8 2011 — edited Jul 9 2011
Hi All,

I have an excluded word list and a list of sentences - I would like to exclude the words in the excluded word list from the sentences

WITH tblExcludeWord AS (
    SELECT 'cat' AS excluded_word FROM DUAL UNION ALL
    SELECT 'dog' AS excluded_word FROM DUAL UNION ALL
    SELECT 'cat' AS excluded_word FROM DUAL
), tblSentences AS (
    SELECT 'My cat eats dogs' AS excluded_word FROM DUAL UNION ALL
    SELECT 'I like to walk my dog' AS excluded_word FROM DUAL
)
SELECT  *
  FROM  tblExcludeWord, tblSentences
;
Wanted Output
My eats dogs
I like to walk my

Unsure how best to approach this...
This post has been answered by 189821 on Jul 8 2011
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 6 2011
Added on Jul 8 2011
12 comments
361 views