WARNING! BEFORE YOU USE THE CODE LISTED ABOVE, PLEASE READ THE FOLLOWING!
If someone is looking for a code solution to ignore duplicates then, sorry, the code above shouldn't be it. You will end up leaving out people that have legitimate names.
For example, I have a very good friend on this very site by the name of Michael John. I also have a work acquaintance whose name is John Michael.
If you have known "typo's", then fix the data instead of making this terrible mistake.
To check for possible such typo's as candidate rows that need manual verification, then do something like the following (I played this against the AdventureWorks database) and then manually verify whether or not the entries are correct or not You might even want to add a HasBeenVerified column to your table so they don't show up in such validation queries in the future.
Here's the code...
SELECT lftBusinessEntityID = lft.BusinessEntityID
,rgtBusinessEntityID = rgt.BusinessEntityID
,lftFirstName = lft.FirstName
,lftLastName = lft.LastName
,rgtFirstName = rgt.FirstName
,rgtLastName = rgt.LastName
FROM person.Person lft
JOIN person.Person rgt
ON lft.FirstName = rgt.LastName
AND lft.LastName = rgt.FirstName
AND lft.BusinessEntityID < rgt.BusinessEntityID
ORDER BY lftFirstName,rgtLastName
... and here's the output from that code...
ALL of those First/Last name combinations are valid and common name combinations. Ignoring any of them with your code can be a serious mistake on your part. You MUST manually verify which ones are valid and FIX the ones than aren't.