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!

Query to find if a list exists in table

519624Jun 22 2006 — edited Jun 22 2006
Hello All,

I have a requirement where in I am given a a list of values and should find which all items in the list is present in table and which aren't

Say the list i am given is

1A,1B,1C,1D,1E,1K

and the table contains

colList
------
1A
1B
1C
1D
1F
1G
1J

I want the output to be something like this

1A Yes
1B Yes
1C Yes
1D Yes
1E No
1K No

Is there a way to achieve it by SQL?

Thanks in advance.
Arun
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 20 2006
Added on Jun 22 2006
9 comments
940 views