View Full Version : Seems like this would be easy - please help...


jbaker
10-07-2001, 08:37 AM
I have 2 tables, one number column in each table - I want to delete the numbers listed in the 2nd table from the numbers in the 1st table if they match.
Example: Table 1 has the numbers 1,2,3,4, and 5 listed in it. Table 2 has the numbers 2,3, and 5 in it. what I need is a query/code to delete each of the matching numbers in table 1, so the only numbers that are left in the 1st table are 1 and 4...how can i accomplish this...

thanks...

jwindon
10-07-2001, 09:25 AM
Are the tables related by this field? In that case simply enforce referential integrity and delete the 2, 3 and 5 from your first table. This is of course assuming that you have a one to many relationship.

jbaker
10-07-2001, 09:52 AM
thank you very much - that was exactly what i was missing...