On sybase. I've got a load of primary keys
If I do:
select key from table where key in (...list of about 2000 keys...)
I get about 1700 results. Whats the easiest way to get a list of the ~300 entries in my list that arent present?
It seems to be something that should be easy, but I cant work it out...
EDIT: Seems an example may be in order
If my table has keys 1,2,4 and my list is 1,2,3 then I want a query that will give me the answer 3 - the element in my list that isnt in the table. If I use 'NOT IN' then I get the answer 4, which is wrong.