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
Dyanamic addition on target columns
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
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.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.