Merge duplicates script.
I want to create a script to merge duplicates.
I made a merge database of 3 contact databases I have, each of them have different data and all are imported into one solution. I even duplicated name fields, in order not to automatically replace data that I might use.
Here's what it looks like
DB ID NAME PHONE EMAIL NAME2 COMPANY POSITION NAME3 BIRTHDATE
CONTA 01 John Thompson 8-88888 firstname.lastname@example.org
JOB 01 John Thompson Company CEO
DOB 01 John Thompson 1950-02-01
Note, that not all the records are present in CONTA, JOB or DOB databases. So It
1) first of all check if ID is repeated in database more than once,
2) then Set fields from 2nd and 3rd rows, that they all were in one record.
3) Remove 2nd and 3rd (duplicate) rows.
As I'm not experienced with loop-type scripts, It would be great if somebody shared a script from the start till the end. Thanks.