Hi all,
I have a requirement to convert the rows present in a source table to Columns.
For ex:
Id Name Value
1 Jhon 3
1 Sam 5
2 Serena 1
2 William 7
2 Jose 9
3 Paul 5
3 Fedy 4
and the required output is
**1st record**
Id Jhon Sam
1 3 5
**2nd record**
Id Serena William Jose
2 1 7 9
**3rd record**
Id Paul Feddy
3 5 4
The data in the target is very huge(Around 80 million).
I cant implement this logic in SQL query and extract it from Oracle stage in datsatge as for each Id the Columns are differing and also the data is huge.
Please explain me the procedure how to implement the same in datastage without degrading the perfomance.
Converting Rows to Columns
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
It's a vertical pivot. Since you have no other way of doing it, there's no danger of degrading performance because you don't have any "performance".
Search for "vertical pivot".
Search for "vertical pivot".
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.
balu356 - Ray suggested you use the Search to find the many threads that deal with this question of vertical pivoting. If you search those threads and don't find the information you are seeking then please ask on this thread.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
I've searched using the Vertical Pivot literal but there were many threads,where everyone is replying to search for the topic as it was already discussed many times,but i couldn't really find one which solves my logic.I found a solution where the number of records per key are fixed but that's not the case with me.Please provide me the link to the Original thread where the Vertical Pivot is done for Dynamic rows(i.e no specific count of rows for a particular Key)
Regards,
Balakrishna
Regards,
Balakrishna
I've searched using the Vertical Pivot literal but there were many threads,where everyone is replying to search for the topic as it was already discussed many times,but i couldn't really find one which solves my logic.I found a solution where the number of records per key are fixed but that's not the case with me.Please provide me the link to the Original thread where the Vertical Pivot is done for Dynamic rows(i.e no specific count of rows for a particular Key)
Regards,
Balakrishna
Regards,
Balakrishna