Delete

blander

Registered User.
Local time
Today, 13:20
Joined
Aug 8, 2006
Messages
14
Hi guys,

Why wont this query work??

DELETE Work.MemID
FROM Work2 INNER JOIN [Work] ON Work2.EMAIL = Work.EMAIL
WHERE (((Work.MemID)<>[Work2].[MemID]));

Two tables as you can see..

And all i want to do is delete records in one table which dont have the same MemID in another table..
 
Try it with an outer join and where MemID is null. That is, set it up as an unmatched query. I haven't tried it, but it seems like it might work. Also, you need to have an asterisk for the table from which the records are to be deleted instead of a field name.

OK, you got me wondering so I tried it and got this, which works:

DELETE Zips.*
FROM Zips
WHERE
ZipID Not IN(Select Zip FROM MyZip);
 
Last edited:
Thanx so much for all ur help :)
 

Users who are viewing this thread

Back
Top Bottom