Click here to Skip to main content
15,905,971 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello.

I need a query where i will want to egt the ids that not where found in a table for example

Having a table Inbox
Id | Name |
---------------------
1 | Dude
2 | Other Dude
3 | Some Dude
4 | That Dude

if i search for Ids 1,3,6,7,10 i will like my query to return 6,7 and 10

is it possible?, how would the query be?

Thanks
Posted

1 solution

How are you passing in 1,3,6,7,10 to your query in this example?

You need to get those values into a seperate table, or some sort of virtual function driven table. Then its something like:

select id from <new table> where id not in (select id from <existing table>)
 
Share this answer
 
v2
Comments
manchukuo 25-Aug-11 13:30pm    
Thanks,
How do i create the virtual table for my ids that i want to check?

Using Create Table and Inserting data to it? like a normal one?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900