Query to find if a list exists in table
519624Jun 22 2006 — edited Jun 22 2006Hello 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