Hi guys,
I need a help writing a Batch file to solve an issue, I have no experience writing these commands.
I have a .csv file which contains duplicate column entries
ROW CODE Status StatusDate EMAIL COL5
1 1234 REL 2/11/2016 6:18 ABC@G.com NEVADA US
2 1234 REL 2/11/2016 6:10 ADE@G.com NEVADA US
3 9856 CNF 9/18/2016 10:00 OkC@G.com SWITZERLAND CH
4 5879 MCNF 1/28/2016 12:00 yey@G.com FRANCCE FR
Above table do not contain duplicate entries but duplicate column entries i.e. Row1 and Row 2, for CODE 1234, these entries differ only in StatusDate.
My requirement if to sort the Table on the base on CODE and StatusDate and remove the first entry i.e. entries whose StatusDate is earlier.
[ delete Row 2 and Keep Row 1 as StatusDate of ROW2 is earlier than ROW1 ]
Please help resolving these issue.
Thanks,
Delete Duplicate Column Enteires
Moderator: DosItHelp
Re: Delete Duplicate Column Enteires
If this is a CSV file where are the commas?
This would be easy enough to do in Excel. Sort by your date and time column and then chose the remove duplicates option.
This would be easy enough to do in Excel. Sort by your date and time column and then chose the remove duplicates option.
Re: Delete Duplicate Column Enteires
the table is in csv(comma separated), I have only posted the example how my Table look like.
I want to do this using Batch job as I have this csv file stored at server and I will be picking up using Dell Boomi Tool which will push the data to Salesforce.
In Boomi I have to use Program Command option which will run this Job. That's why I ask If anyone can help me with Batch job.
I want to do this using Batch job as I have this csv file stored at server and I will be picking up using Dell Boomi Tool which will push the data to Salesforce.
In Boomi I have to use Program Command option which will run this Job. That's why I ask If anyone can help me with Batch job.
Re: Delete Duplicate Column Enteires
puneet wrote:the table is in csv(comma separated), I have only posted the example how my Table look like.
Please post an exact representation of your data with the commas.
Re: Delete Duplicate Column Enteires
Use Notepad or download Notepad++ and edit the file with either platform and then copy into DosTips. Your commas will be retained.
Re: Delete Duplicate Column Enteires
puneet wrote:the table is in csv(comma separated), I have only posted the example how my Table look like.
Squashman's point is an important one puneet.
Programming code performs exact operations so if the format of the csv file is different from the example then the code you get will very often not work.
See here: viewtopic.php?f=3&t=6108