Page 1 of 1

How to split single row into multiple rows in datastage

Posted: Thu Nov 11, 2004 12:41 pm
by sami
Hi ,
I think that this topic has already been discussed, but I still dont know how t o do that..?
I have a single row comming in which can have upto 5 codes in that. Sometimes it may have one cd, sometimes all of them.
There is only 1 target column for that, so i need to send them all to one column, and an Id is automatically generated for each comming in row..
Can someone help me on how I can achieve this. It is somethin like a horizontal pivot thin. There is a Pivot stage, will that help??
thanks,

Posted: Thu Nov 11, 2004 1:17 pm
by ririr
Use the Cats function.

Here is the Syntax of concatenatiing 5 fields(Columns)

Cats(Cats(Cats(Cats(ColA,ColB),ColC),ColD),ColE)

Re: How to split single row into multiple rows in datastage

Posted: Thu Nov 11, 2004 1:35 pm
by shawn_ramsey
You would use the pivot stage. It is a little tricky to use but there are several good discussions on it in theis forum.

Posted: Thu Nov 11, 2004 3:13 pm
by ray.wurlod
Pivot stage is exactly the right tool for your stated requirement.
The examples in the manual (pivot.pdf) will show you exactly how to achieve it.