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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query -> remove double records

Status
Not open for further replies.

wanmaster

Programmer
Nov 20, 2000
94
NL
I have a large database containing persons (firstname,infix,lastname,date of birth etc.), and I need a query to delete/find all the record that are exactly the same (same firstname and lastname and infix...).
I tried all kinds of different (sub)queries, but the problem is that the query compares record #1 with record #1 and always finds a double, even if I compare their id's (which a unique).
Somebody done this before??

Remedy.
 
If you just want to know what records are duplicated, in your query wizard, there's a function called "Find Duplicates Query Wizard".

That will find all of you duplicate records.

If you want to find just one instance on your original query, if you switch from the design view to the SQL view and add the word "Distinct" behind "Select" (assuming all of the fields used in the query will have duplicate information) that should knock out duplicates and return only one record.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top