Delete query

G

Gargamil

I have a simple select query which returns all the records of a table which
I want to keep. Now delete queries remove everything that matches the
criteria defined in the query. How do I delete everything that DOESN'T
match the selected criteria??
The select query returns all records that have matching records in another
table. I'm looking to remove all those records that do not have matching
records in the other table. Any clues??
 
U

user

SELECT * FROM tblTwo
WHERE (((tblTwo.MatchField) Not In (select MatchField from tblOne)));

gives you all records in tblTwo that have a value in MatchField with no
matching value in the field MatchField in table tblOne.

Doug
 
G

Gargamil

Legend.

user said:
SELECT * FROM tblTwo
WHERE (((tblTwo.MatchField) Not In (select MatchField from tblOne)));

gives you all records in tblTwo that have a value in MatchField with no
matching value in the field MatchField in table tblOne.

Doug
 
Top