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

Find Duplicates in multiple fields 1

Status
Not open for further replies.

tyemm

Technical User
Feb 28, 2005
66
US
I have a long list of names ("Last", "First", "DOB", etc.) and when I run the find duplicates wizard on one of these fields, I get a very long list of duplicates (e.g. every Smith is listed as a duplicate).
I'd like to concatenate this query, so that I can find all the duplicate last names that also have the same (duplicate) first name, and then DOB, etc.
When I run the find duplicates query on my first find duplicates query (i.e. look for duplicate first names within the query that found duplicate last names), I still get a very long list (e.g. every Frank is listed within the last name duplicates query, etc.). This is not getting me where I want to go?

Surely this is simple: multiple field duplicates identification (I don't want to delete, but to identify for other purposes).

Thanks,
Tom Y
 
A starting point (SQL code):
SELECT [last name], [first name], DOB, Count(*) As Dups
FROM yourTable
GROUP BY [last name], [first name], DOB
HAVING Count(*)>1

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
That seems to work; I knew it would be simple.
Thank you kindly!~
 
When you run the Find Duplicates wizard, it lets you pick multiple fields to define what a "duplicate" is. I think that would have accomplished the same thing as PHV's code (although I think I prefer PHV's SQL over that produced by the query wizard).

 
Thanks PHV, have a star, I was looking for that as well.
You should have had a star earlier.
Regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top