How to split single row into multiple rows in datastage

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
sami
Participant
Posts: 8
Joined: Fri Aug 20, 2004 12:52 pm

How to split single row into multiple rows in datastage

Post 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,
ririr
Participant
Posts: 84
Joined: Sun Apr 04, 2004 8:59 pm

Post by ririr »

Use the Cats function.

Here is the Syntax of concatenatiing 5 fields(Columns)

Cats(Cats(Cats(Cats(ColA,ColB),ColC),ColD),ColE)
shawn_ramsey
Participant
Posts: 145
Joined: Fri May 02, 2003 9:59 am
Location: Seattle, Washington. USA

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

Post 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.
Shawn Ramsey

"It is a mistake to think you can solve any major problems just with potatoes."
-- Douglas Adams
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply