Distribute data in various columns in tabular form

2 posts / 0 new
Last post
lorrainedlcv
Offline
Joined: 04/10/2019 - 09:52
Distribute data in various columns in tabular form

Hi,
I'm searching to modify the data that is distributed into various columns into various lines to be able to manipulate and filter information. This is somehow and example of how the columns look:
Name / Last name / Data1 ID / Data1 BEGDATE / Data1 ENDDATE / Data2 ID / Data2 BEGDATE / Data2 ENDDATE / Data3 ID / Data3 BEGDATE / Data3 ENDDATE
And this is how I need them:
Name / Last name / Data1 ID / Data1 BEGDATE / Data1 ENDDATE
Name / Last name / Data2 ID/ Data2 BEGDATE / Data2 ENDDATE
Name / Last name/ Data3 ID/ Data3 BEGDATE / Data3 ENDDATE
Thanks in advance.

Brian Element's picture
Brian Element
Offline
Joined: 07/11/2012 - 19:57

If there are only three sets of data what I would do is three file extractions, extracting all the records but limiting the fields.  The first extraction would be Name / Last name / Data1 ID / Data1 BEGDATE / Date1 ENDDATE, the second extract would be Name / Last name / Data2 ID / Data2 BEGDATE / Date2 ENDDATE and the thrid extract would be Name / Last name / Data3 ID / Data3 BEGDATE / Date3 ENDDATE.  I would then rename the ID, BEGDATE and ENDDATE to the same name and the final step would be to append the three files together.  If there are more then you could do a script with a loop to do the extract and append.