Can you compare a list against a table, and see which items aren't in table?
I have a large list of items and I'd like to see if they exist in database table, but I don't want to run one query after another. Is there a way I can take a list of items and run it quickly against a table and find out which items don't exist in both?
Re: Can you compare a list against a table, and see which items aren't in table?
I think an IN clause containing your list values used in a SQL query can accomplish what you are asking
Re: Can you compare a list against a table, and see which items aren't in table?
Quote:
Originally Posted by
yellowledbet
I think an IN clause containing your list values used in a SQL query can accomplish what you are asking
Thanks I thought that as well but I don't know how big a SQL statement can be, or how many INs you can have, or how slow an IN is. That's why I wasn't sure if it was the best way to go. In any case, like is often the case for me, after I wrote out my question I figured out a solution that might work for me. Thanks for the reply though! :)
Re: Can you compare a list against a table, and see which items aren't in table?
Moved from New to Java
db