hello, il explain what i mean.
i have a csv file like that.
X Y Z V
ax ax ax ax
F1 0.1 0.2 0.1 0.6
F2 0.3 0.4 0.1 0.2
F3 0.9 0.8 0.4 0.7
i would like to have this file at end.
F1 X 0.1
F1 Y 0.2
F1 Z 0.1
F1 V 0.6
F2 X 0.3
F2 Y 0.4
F2 Z 0.1
F2 V 0.2
F1 X 0.9
F3 Y 0.8
F3 Z 0.4
F3 V 0.7
is it possible, i hear about PIVOT table, but i don't know if it matches with my problem
thanks for your help
one 12 columns in rows (not for all the data file)
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
That one would requre a certain extra, you need to preserve the values from the first line in the file, discard the second line, and process the remainder.
The first line can be preserved in a stage variable. Its derivation would be of the form IF @INROWNUM=1 THEN col1:",":col2:",":col3:",":col4 Else stagevariable.
You can use an output constraint (@INROWNUM > 2) to cause only lines 3 and beyond to be processed.
The remainder should be able to be done with a pivot stage.
The first line can be preserved in a stage variable. Its derivation would be of the form IF @INROWNUM=1 THEN col1:",":col2:",":col3:",":col4 Else stagevariable.
You can use an output constraint (@INROWNUM > 2) to cause only lines 3 and beyond to be processed.
The remainder should be able to be done with a pivot stage.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.