Delete dups

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

SQL VIEW:
DELETE Clean_Export.*
FROM Last_Week INNER JOIN Clean_Export ON (Last_Week.LW_Rec_Ident =
Clean_Export.Rec_Ident) AND (Last_Week.LW_Rec_Detail =
Clean_Export.Rec_Detail);

That is what I have so far.

I have a table called Last_Week with fields LW_Rec_Ident and LW_Rec_Detail.
I
have another table called Clean_Export with fields Rec_Ident and Rec_Detail.

The Ident fields contain a code that will be the same in each table. If the
Ident fields match in both tables than the Detail fields in both tables could
also match. If they DO match I want them deleted from Clean_Export only.
 
Try this modification (ON A COPY of your table)

DELETE DistinctRow Clean_Export.*
FROM Last_Week INNER JOIN Clean_Export ON (Last_Week.LW_Rec_Ident =
Clean_Export.Rec_Ident) AND (Last_Week.LW_Rec_Detail =
Clean_Export.Rec_Detail);
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top