Page 1 of 1

transpose records

Posted: Tue Apr 07, 2009 12:43 am
by Aggie99
Hi guys,

I was trying to restructure rows to columns. I used PIVOT stage but was not getting the results I want.

This is what I tried to do.

SOURCE contains 5 cols in a csv file (see below)

Val1 VAl2 Val3 Val4
ID 1 2 3 4
DESC A B C D


Expected Result: 2 columns: ID and DESC (see below)
ID DESC
1 A
2 B
3 C
4 D

How can I do this??

thx,
Agggie

Posted: Tue Apr 07, 2009 6:25 am
by Sainath.Srinivasan
Search for pivot.

There is also an FAQ about this.