Dyanamic addition on target columns

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
bijojames
Participant
Posts: 12
Joined: Wed Nov 28, 2007 10:27 pm
Location: THANE

Dyanamic addition on target columns

Post by bijojames »

Hi,

My sample input is as following
CUST_ID YEAR MONTH QTY
1 2008 JAN 1000
1 2008 FEB 1200
1 2008 MAR 1300
2 2007 JAN 1000
2 2007 FEB 1900

And my required target is
CUST_ID JAN_08 FEB_08 MAR_08 JAN_07 FEB_07
1 1000 1200 1300 0 0
2 0 0 0 1000 1900

Here my target is not static. For example at the end of this month i need to have one column OCT_08 in my target.
Like this it will go on

Some body please help me on this
Thanks in advance
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

And your 'target' is what exactly? A flat file?
-craig

"You can never have too many knives" -- Logan Nine Fingers
bijojames
Participant
Posts: 12
Joined: Wed Nov 28, 2007 10:27 pm
Location: THANE

Post by bijojames »

Hi
Thats just a sample target.The target is a DB2 table
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Search DSXchange for "vertical pivot" for this is what you are attempting to achieve.
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