Converting Rows to Columns
Posted: Fri Jun 26, 2009 12:27 am
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.
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.