What is the best way to de-dupe person records? We have thousands of duplicate contacts in our system and need
to get it cleaned up quickly. What is the best way to accomplish this?
Thanks.
What is the best way to de-dupe person records? We have thousands of duplicate contacts in our system and need
to get it cleaned up quickly. What is the best way to accomplish this?
Thanks.
Here is some SQL that will find you all of the people with the same name, associated to the same company, where they appear more than once:
SELECT comp_companyId,comp_name,LTRIM(RTRIM(pers_firstname))+' '+LTRIM(RTRIM(pers_lastname)) [Person Name],COUNT(LTRIM(RTRIM(pers_firstname))+' '+LTRIM(RTRIM(pers_lastname))) [Assocaited to company]
FROM Company
INNER JOIN Person on Pers_CompanyId = Comp_CompanyId AND pers_deleted IS NULL
WHERE comp_deleted IS NULL
GROUP BY Comp_CompanyId,comp_name,pers_firstname,pers_lastname
HAVING COUNT(LTRIM(RTRIM(pers_firstname))+' '+LTRIM(RTRIM(pers_lastname))) > 1
You could then write some SQL to select the appropriate contact and mark them as deleted, but before you do you need to ensure records are not associated to them such as comms, oppos, cases etc. Again, you can write SQL to find all of these if required.
The safest way is always through the interface.
*Community Hub is the new name for Sage City