Find Duplicate Records

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

Guest

I'm looking for a way to find duplicate records within a table. I want to
filter by FirstName & LastName. I would like the querie to show me the
duplicate records so I can decide which one to keep. I'm sure the answer is
in here somewhere, but I cant seem to find it. Any help?
 
Try:

SELECT A.*
FROM TableName A INNER JOIN
(SELECT TableName.FirstName, TableName.LastName, Count(TableName.FirstName)
AS CountOfFirstName
FROM TableName
GROUP BY TableName.FirstName, TableName.LastName
HAVING (((Count(TableName.FirstName))>1))) B ON A.FirstName = B.Firstname
AND A.LastName = B.LastName
ORDER BY A.FirstName, A.LastName;
 
Back
Top