I have a file in the following format:
co1 col2 col3
row1 data11 data12 data12
row2 data21 data22 data23
row3 data31 data32 data33
the data should be modified:
row1 col1 data11
row1 col2 data12
row1 col3 data13
row2 col1 data21
row2 col2 data22
the number of columns is dynamic.
i tried 'make subrecord' stage, but it didn't produce the correct result.
would really appreciate any suggestions.
Row/Column File Transpose
Moderators: chulett, rschirm, roy
Re: Row/Column File Transpose
Hi,belaruska wrote:I have a file in the following format:
co1 col2 col3
row1 data11 data12 data12
row2 data21 data22 data23
row3 data31 data32 data33
the data should be modified:
row1 col1 data11
row1 col2 data12
row1 col3 data13
row2 col1 data21
row2 col2 data22
the number of columns is dynamic.
i tried 'make subrecord' stage, but it didn't produce the correct result.
would really appreciate any suggestions.
With a Pivot stage u can get the following output:
row1 data11
row1 data12
row1 data13
row2 data21
row2 data22
I am not sure how to get the column name as part of the output record
Regards,
Senthil
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: