transpose records

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
Aggie99
Participant
Posts: 54
Joined: Thu Sep 04, 2008 6:54 pm

transpose records

Post 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
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Search for pivot.

There is also an FAQ about this.
Post Reply