Page 1 of 1

converting a single row to multiple rows

Posted: Thu Jun 02, 2011 12:14 pm
by nishantrk
I have the data coming in as below
col1 col2 col3 col4
Jay x x
kay x x


output :Insert into DB2 table using ODBC

jay col2
jay col4
kay col2
kay col3

Since we have only 8.1 version..I was thinking for having a transformer stage with 3 outputs each having a constrain on cols2,col3 col4 respectively.

Since am brand new to data stage , curious to know if this could be done by other methods and their merits..

Posted: Thu Jun 02, 2011 1:27 pm
by vinothkumar
Search for "pivoting" in this forum which helps you more on this.

Posted: Thu Jun 02, 2011 1:51 pm
by chulett
A "horizontal pivot" specifically... columns to rows.

Posted: Wed Jun 08, 2011 3:51 am
by Bicchu
A pivot stage can able to solve the problem. In the derivation section of the output tab in the pivot stage, give the column names that you want to convert from horizantal to vertical form.

Posted: Fri Jun 17, 2011 1:38 pm
by satisht
Yeah Pivot can help

Posted: Fri Jun 17, 2011 4:04 pm
by ray.wurlod
Use a Pivot stage (or a PXPivot stage).
:wink: