Vertical pivot
Posted: Tue Jan 06, 2015 2:59 am
Hello,
I have a scenario where the number of rows for the each key column is differs. I need to convert these rows in to columns. Max number of rows i get for each key column is 3.
Example
TCN, SEQ_NUM, VALUE
0321 001 BK
0321 002 BF
My out put should be
TCN, SEQ_NUM_1, SEQ_NUM_2, SEQ_NUM_3, VALUE_1, VALUE_2,VALUE_3
0321, 001, 002,'',BK,BF,''
I am using pivot vertical stage but its works correctly i have 3 rows but less than 3 it fails, because the out put columns from pivot stage is by default not null..
Thanks
I have a scenario where the number of rows for the each key column is differs. I need to convert these rows in to columns. Max number of rows i get for each key column is 3.
Example
TCN, SEQ_NUM, VALUE
0321 001 BK
0321 002 BF
My out put should be
TCN, SEQ_NUM_1, SEQ_NUM_2, SEQ_NUM_3, VALUE_1, VALUE_2,VALUE_3
0321, 001, 002,'',BK,BF,''
I am using pivot vertical stage but its works correctly i have 3 rows but less than 3 it fails, because the out put columns from pivot stage is by default not null..
Thanks