Using the Pivot Stage
Posted: Thu Apr 22, 2004 12:45 pm
I am creating a job to convert a single row into multiple rows so I am using the pivot stage. My input looks like this:
Key Col1 Col2 Col3
A 1 2 3
B 4 5 6
My desired results are:
Key Col Value
A Col1 1
A Col2 2
A Col3 3
B Col1 4
B Col2 5
B Col3 6
I am able to do the horizontal split but how can I populate the 'Col' value in my results so that I can keep track of what my value represents?
Key Col1 Col2 Col3
A 1 2 3
B 4 5 6
My desired results are:
Key Col Value
A Col1 1
A Col2 2
A Col3 3
B Col1 4
B Col2 5
B Col3 6
I am able to do the horizontal split but how can I populate the 'Col' value in my results so that I can keep track of what my value represents?