I am trying to merge 2 CSV files together and then sort the data by several of the fields.
The fields are either all alpha or all numeric. The numeric, however, is not decimal. I noticed in the help menu, it says for sorting the number must be in decimal format. How do I get around that?
I created a filter that doesn't appear to do anything, but merge the files together.
Any help would be appreciated.
Thank You.
Sorting a CSV
Moderators: DataMystic Support, Moderators, DataMystic Support, Moderators, DataMystic Support, Moderators
- DataMystic Support
- Site Admin
- Posts: 2227
- Joined: Mon Jun 30, 2003 12:32 pm
- Location: Melbourne, Australia
- Contact:
The numbers are integers, account numbers really. Maybe that's the same as decimal.... : )
I have 2 files, one has STM in the first field the other has CFN in the first field.
The third field has the account number. I want to first sort by the account number to group all lines together, then sort by the first field to separate the STM lines from the CFN lines. I can put a line counter on the input files, which I would sort by to keep the transactions within STM and CFN, respectively, in the same order as the input.
Below is an example of the first part of a merged file the I sorted using excel. It worked, but I need to automate this task and excel has problems getting the data back to me in a usable format.
STM,REC01,10012,10000000001,
STM,REC04,10012,10000000001,
STM,REC09,10012,10000000001,
STM,REC01,10056,10000000001,
STM,REC04,10056,10000000001,
STM,REC04,10056,10000000001,
STM,REC04,10056,10000000001,
STM,REC04,10056,10000000001,
STM,REC09,10056,10000000001,
CFN,REC01,10056, 107198,
CFN,REC02,10056, 107198,
CFN,REC02,10056, 107198,
CFN,REC02,10056, 107198,
CFN,REC02,10056, 107198,
CFN,REC02,10056, 107198,
I hope this clarifies it a bit more. I just don't really understand TextPipes sorting feature that well, because it doesn't appear to do anything when I use it in conjuction with the Restricted fields filter.
Any help is greatly appreciated.
Thank You.
I have 2 files, one has STM in the first field the other has CFN in the first field.
The third field has the account number. I want to first sort by the account number to group all lines together, then sort by the first field to separate the STM lines from the CFN lines. I can put a line counter on the input files, which I would sort by to keep the transactions within STM and CFN, respectively, in the same order as the input.
Below is an example of the first part of a merged file the I sorted using excel. It worked, but I need to automate this task and excel has problems getting the data back to me in a usable format.
STM,REC01,10012,10000000001,
STM,REC04,10012,10000000001,
STM,REC09,10012,10000000001,
STM,REC01,10056,10000000001,
STM,REC04,10056,10000000001,
STM,REC04,10056,10000000001,
STM,REC04,10056,10000000001,
STM,REC04,10056,10000000001,
STM,REC09,10056,10000000001,
CFN,REC01,10056, 107198,
CFN,REC02,10056, 107198,
CFN,REC02,10056, 107198,
CFN,REC02,10056, 107198,
CFN,REC02,10056, 107198,
CFN,REC02,10056, 107198,
I hope this clarifies it a bit more. I just don't really understand TextPipes sorting feature that well, because it doesn't appear to do anything when I use it in conjuction with the Restricted fields filter.
Any help is greatly appreciated.
Thank You.
- DataMystic Support
- Site Admin
- Posts: 2227
- Joined: Mon Jun 30, 2003 12:32 pm
- Location: Melbourne, Australia
- Contact: