NEWBIE HERE...Two tables.. want to delete duplicates between them

marydoyle9

Crckrs9
Local time
Today, 15:22
Joined
Mar 5, 2003
Messages
17
I think this is an easy one...

I have two tables - one is a Master. I want to delete the records in the Master if they are in the second table. Here's my SQL and I can't get it to work:

DELETE from TestMaster
INNER JOIN on JoinedDupList
ON TestMaster.ID=JoinedDupList.ID
WHERE JoinedDupList.ID = TestMaster.ID


I'm being told I need to define the table to delete from... I thought I defined it.

Thanks!
 
DELETE *
from TestMaster
where ID in (Select ID from JoinedDupList)

^
 
Worked like a charm... THANKS!!!!!!!
 

Users who are viewing this thread

Back
Top Bottom