Hi
I have a vertical pivot requirement.
Table1
col1 col2
X 2
X 3
X 4
Y 1
Y 2
Table2
col1 col2 col3 col4
X 2 3 4
Y 1 2 0
If the values in the first col1 are equal then the corresponding values in
col2 then should be mapped to table2 cloumns 2,3,4. If no values are found then it should be mapped with 0.
Please suggest.
Bob
Vertical pivot
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Hi,
Sounds like a simple vertical pivot + filtering on the results to me.
Sounds like a simple vertical pivot + filtering on the results to me.
Roy R.
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
There is a very simple approach using stage variables. It may be posted on the server forum, but it will work just as well in parallel jobs. You just have to make sure that the data are partitioned on the first column values so that all values of each distinct value are on the one partition.
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.