Page 1 of 1

How to convert multiple rows of data into single row

Posted: Fri Aug 11, 2006 9:40 am
by adams06
Hi,


How to convert multiple rows of data into single row?

ex: input

field1

a
b
c
d

output:

a,b,c,d

Re: How to convert multiple rows of data into single row

Posted: Fri Aug 11, 2006 9:52 am
by prabu
adams06 wrote:Hi,


How to convert multiple rows of data into single row?

ex: input

field1

a
b
c
d

output:

a,b,c,d

1)pivot stage

Re: How to convert multiple rows of data into single row

Posted: Fri Aug 11, 2006 10:03 am
by adams06
Hi Prabu,

can you explain in detail

Thanks
prabu wrote:
adams06 wrote:Hi,


How to convert multiple rows of data into single row?

ex: input

field1

a
b
c
d

output:

a,b,c,d

1)pivot stage

Posted: Fri Aug 11, 2006 10:17 am
by thumsup9

Posted: Fri Aug 11, 2006 11:17 am
by Luciana
The pivot stage reads 1 row with 4 columns and it generates 4 rows with 1 column.

If you you want to read multiple rows (1 column) into single row with the content of the column field1 of all rows, use ROW MERGE stage, but include transforms stage before the row merge stage for connects ";" in the end of the column.

Ex.:
Input --> Transformer --> Row Merge --> Output
a --> a : ";" -->
b --> b : ";" -->
c --> c : ";" -->
d --> d : ";" --> --> a;b;c;d

Posted: Fri Aug 11, 2006 12:25 pm
by meena
Hi adams06...
You can use "row merger active plug-in stage" and Luciana as explained you in detail..Let us know if you do not have row merger plugin stage......