combining files ignoring duplicates
Posted: Thu May 21, 2015 2:47 pm
Hi,
is there a way or an example) of doing the following:
I have 2 text files with 3 columns each - the date, a store number, and a count
I need to combine these 2 files into a single (third) text file, but I cannot have duplicate store number records in the result file.
My first thought is to load all data from one file into the new file, and then load data from the second file but ignore any duplicate store records. So basically, the third file should have the store number as the "key".
Also, if I can, the transaction being discarded (the duplicate) needs to be written to an error file.
Any quick thoughts or hints? would it be easier to have the third file as an .xlsx file?
TIA,
Kevin
is there a way or an example) of doing the following:
I have 2 text files with 3 columns each - the date, a store number, and a count
I need to combine these 2 files into a single (third) text file, but I cannot have duplicate store number records in the result file.
My first thought is to load all data from one file into the new file, and then load data from the second file but ignore any duplicate store records. So basically, the third file should have the store number as the "key".
Also, if I can, the transaction being discarded (the duplicate) needs to be written to an error file.
Any quick thoughts or hints? would it be easier to have the third file as an .xlsx file?
TIA,
Kevin