Requirement like PIVOT

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
senthilmp
Participant
Posts: 85
Joined: Mon Sep 22, 2008 6:11 am

Requirement like PIVOT

Post by senthilmp »

Hi,

Currently am trying to do the following:

Have source data as follows:

ID Name FYM Qty Sales
1 A 200901 1 500
2 B 200902 5 1000
3 C 200901 4 150
4 D 200902 2 252
5 E 200903 9 785
6 F 200903 7 451
7 A 200902 4 410

I have to load into target as below:

ID Name 200901Qty 200901Sales 200902Qty 200902Sales 200903Qty Sal
1 A 1 500 4 410
2 B 5 1000
3 C 4 150
4 D 2 252
5 E 9 785
6 F 7 451


i.e the Qty and Sales should come under the specic FY column defined for the ID/Name,
Can you help me out how can i do this in Pivot stage?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You can not. It's a vertical pivot. A Search for that term will yield a number of solutions, particularly for server jobs.

Moderator: please move to server forum
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
senthilmp
Participant
Posts: 85
Joined: Mon Sep 22, 2008 6:11 am

Post by senthilmp »

Ok thanks, and i posted this message in server Forum only, dont no in which forum its currently in
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

No, you posted in the Enterprise Edition forum, but marked the job type as server. That's not the same thing as posting in the Server Edition forum.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply