Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

change Find Duplicates To Delete Duplicates ?

Status
Not open for further replies.

p27br

Programmer
Joined
Aug 13, 2001
Messages
516
Location
GB
hi,

generally speaking, I'd like to be able to transform a Find Duplicate query into a Delete Duplicates query.
How would I have to proceed ?

thanks
 
First you need to identify which duplicates to delete (you need a key element to display in the Find Duplicates query)
Use the Find Duplicates query as source for an 'In (Select...) statement. The In(Select...) should contain a Where clause to return ALL keys BUT the one that must remain in place.

But I think it's easier in code, using a recordset based on the Find Duplicates query.

HTH


[pipe]
Daniel Vlas
Systems Consultant

 
danvlas

thanks for answering.
I doesn't really make things clearer but I'll try out the code idea.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top