Concatenation of multiple row string values to one column

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
srimitta
Premium Member
Premium Member
Posts: 187
Joined: Sun Apr 04, 2004 7:50 pm

Concatenation of multiple row string values to one column

Post by srimitta »

Hi All,

My source data looks like this in DB2:
COLA COLB
MIS-1 4 off Strips of clamp rubber
MIS-1 1 off roller bearing
MIS-2 1 off Heater rod
MIS-2 2 off 16mm dia x 299 ground shafts

How can I concatinate COLB for all repeated COLA values.
COLA COLB
MIS-1 4 off Strips of clamp rubber 1 off roller bearing
MIS-2 1 off Heater rod 2 off 16mm dia x 299 general shafts

Any help would be great.
Thanks
Srimitta
Quality is never an accident; it is always the result of high intention, sincere effort, intelligent direction and skillful execution; it represents the wise choice of many alternatives.
By William A.Foster
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

That would be a 'vertical pivot' of rows to columns, search for that term here for many discussions on the topic. Typically, a transformer and stage variables are used to do the concatenation within key groups.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

An upstream Sort stage that generates a Key Change column and a downstream Remove Duplicates stage are valuable here too.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
pradeepbe2006
Participant
Posts: 1
Joined: Tue Nov 03, 2009 4:15 am

PLs Help

Post by pradeepbe2006 »

Hi,

How to do this Job?I tried but unable to resolve.Pls help
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

And you would be whom? First post at the end of someone else's months later doesn't help things much.

:!: Start your own post in the appropriate forum. Include the details of what you need to do there (not here). Then people will be able to help.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply