;WITH ContactCheck AS
ROW_NUMBER() OVER (PARTITION BY legacylastname, legacyfirstname, legacycompanyname OVER ORDER BY legacylastname) as RN
Lets breakdown that ROW_NUMBER() function works:
You can then alter the code based on your definition of duplicate. You may think that by virtue of having the same first and last name they are a duplicate, or you may think that a duplicate is a record with the same first name, last name, company, email address, and street address. The PARTITION clause would need only be modified accordingly, making for some tidy code.
I would highly recommend
Post by: James Diamond,