mutlple columns into single column

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
narsi1111
Participant
Posts: 20
Joined: Mon Jan 15, 2007 12:01 am

mutlple columns into single column

Post by narsi1111 »

Hi ,


this is input structure year, jan,feb,march,april so.....on dec.

and my target structure is totalsales,periodkey

input values are year,jan,feb,march...dec

2006 200 300 400 .... 500

target should be periodkey totalsales

2006jan 200
2006feb 300
please any one can hepl me

Thanks
WoMaWil
Participant
Posts: 482
Joined: Thu Mar 13, 2003 7:17 am
Location: Amsterdam

Post by WoMaWil »

The problem is easy to solve and the question is already often asked. So simply query here and you will find the answer.
Wolfgang Hürter
Amsterdam
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Search for "Pivot stage". Read the Pivot stage manual. You will need an upstream Transformer stage to generate the month names in twelve additional columns.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

As Ray advised, add the month names using transformer and then use the pivot stage. Read about its use in the manual guide.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Post Reply