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!

using Instr with an SQL query list

Richard LeggeMay 16 2016 — edited May 17 2016

Hi All,

SE 12.1

Im been giving myself brain ache with this one.

I have a query where I want to retrieve a set of records if a string in a particular column does not contain a string from a list of strings from another table.

For example.    reference = 'aabbcc'

list to check against

ref_list

--------

'dd'

'ee'

'ff'

if reference does not contain a string in the list, then return reference. if it does, then don't return reference.  I've tried instr (and clearly this syntax won't work, but instr('aabbcc',(select ref_list from table1) = 0

Any clues on how to do this, I would be much appreciated

Regards

Richard

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 14 2016
Added on May 16 2016
13 comments
2,800 views