SQL Query (on access)
-
HI, Can someone help me with following SQL? I have an array of about 200 string IDs in my program (C++). I need to delete these IDs from a database table. I would like to use the most efficent method of doing this. Any suggestions on the best SQL query? Thanks Jeremy Pullicino C++ Developer Homepage
-
HI, Can someone help me with following SQL? I have an array of about 200 string IDs in my program (C++). I need to delete these IDs from a database table. I would like to use the most efficent method of doing this. Any suggestions on the best SQL query? Thanks Jeremy Pullicino C++ Developer Homepage
If your id columns is numeric, try this...
DELETE FROM [Table] WHERE [ID_Column] IN (1,2,3,...,n)
If it's string...DELETE FROM [Table] WHERE [ID_Column] IN ('1','2','3',...,'n)
Free your mind... -
HI, Can someone help me with following SQL? I have an array of about 200 string IDs in my program (C++). I need to delete these IDs from a database table. I would like to use the most efficent method of doing this. Any suggestions on the best SQL query? Thanks Jeremy Pullicino C++ Developer Homepage