The solution provided by <carp> will work well. Sometimes, in addition to seeing the Names, you might also want to see the specific rowids (in this case CustId) of the duplicates. In those cases, you might try either one of the following:
Select DISTINCT A.CustId, A.FName, A.LName
FROM Customers A Inner Join Customers B
ON A.FName = B.FName and A.LName = B.LName
WHERE A.CustId <> B.CustId
ORDER BY A.FName, A.LName, A.CustId
--OR --
Select A.CustId, A.FName, A.LName
From Customers A
Where Exists
(Select B.FName, B.LName From Customers B
WHERE B.FName = A.FName and B.LName = A.LName
GROUP BY B.FName, B.LName
HAVING COUNT(*) > 1)
Order by A.FName, A.LName, A.CustId
----------
brian perry
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.