Page 1 of 1

Concatenation of multiple row string values to one column

Posted: Mon May 11, 2009 3:33 pm
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

Posted: Mon May 11, 2009 4:06 pm
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.

Posted: Mon May 11, 2009 4:14 pm
by ray.wurlod
An upstream Sort stage that generates a Key Change column and a downstream Remove Duplicates stage are valuable here too.

PLs Help

Posted: Sat Nov 07, 2009 1:51 am
by pradeepbe2006
Hi,

How to do this Job?I tried but unable to resolve.Pls help

Posted: Sat Nov 07, 2009 8:40 am
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.