how to Convert row data to 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
vishu19aug
Participant
Posts: 39
Joined: Mon Feb 13, 2012 1:30 pm

how to Convert row data to columns

Post by vishu19aug »

Hi,

I have the following input -

Table_name attribute value
table_000 field1 1200
table_000 field2 1300
table_000 field3 as
table_001 field1 0
table_001 field2 1100
table_001 field3 ad

I want the data in the follwong format -

table_000 field1 1200 field2 1300 field3 as
table_001 field1 0 field2 1100 field3 ad

Can somebody help here? I am new to datastage.

Thanks,
Vishal
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Rows to columns is also known as a 'vertical pivot', something you could do an exact search for here to get all kinds of help. Which also means you should look at the Pivot stage but the capabilities there depend on your exact 8.x version.
-craig

"You can never have too many knives" -- Logan Nine Fingers
vishu19aug
Participant
Posts: 39
Joined: Mon Feb 13, 2012 1:30 pm

Post by vishu19aug »

Thanks! I can see only Pivot and Pivot Enterprise in version 8.7
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Only? How many more do you need? :wink:

Inside them would be an option to drive the 'direction' of the pivot.
-craig

"You can never have too many knives" -- Logan Nine Fingers
kandyshandy
Participant
Posts: 597
Joined: Fri Apr 29, 2005 6:19 am
Location: Singapore

Post by kandyshandy »

2 more Craig :lol:
Kandy
_________________
Try and Try again…You will succeed atlast!!
vishu19aug
Participant
Posts: 39
Joined: Mon Feb 13, 2012 1:30 pm

Post by vishu19aug »

Thanks! it solved my problem
Post Reply