Page 1 of 1

Join 2 data sets removing duplicates using a third input

PostPosted: Thu Feb 22, 2018 2:29 pm
by parthiban_82
I have 2 files which I need to join and get the union of both after removing duplicates. But I need to remove the duplicates based on a 3rd file. If the duplicate record is present in 3rd file then I need to pick the duplicate record from 1st file else I need to pick the record from 2nd file.

Sample

1st file :
account1record from file1
account2record from file1
account3record from file1

2nd file :
account1record from file2
account2record from file2
account4record from file2

3rd file
account1record from file3

Expected result
account1record from file1 ------ since this is present in 3rd file
account2record from file2 ------ since this is not present in 3rd file
account3record from file1
account4record from file2

Re: how to join 2 files removing duplicates using a third in

PostPosted: Thu Feb 22, 2018 2:51 pm
by enrico-sorichetti
when posting, good manners suggest to use intelligent titles
starting a topic with "sort" as title in the syncsort forum section is unconsiderate

if You do not care to post properly there is no reason for anybody to spend time trying to help You

Re: how to join 2 files removing duplicates using a third in

PostPosted: Thu Feb 22, 2018 2:54 pm
by parthiban_82
Hi .. I apologize.... I thought of not loading the title with too much information.

Re: how to join 2 files removing duplicates using a third in

PostPosted: Thu Feb 22, 2018 4:12 pm
by enrico-sorichetti
how to join 2 files removing duplicates using a third input file

looks like a good title to me

topic edited to change the title