concatenate row values into one column based on keys

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
new_ds_man
Participant
Posts: 18
Joined: Tue Jul 08, 2008 1:12 pm

concatenate row values into one column based on keys

Post by new_ds_man »

<>
Last edited by new_ds_man on Thu Oct 25, 2012 2:21 pm, edited 1 time in total.
bhasds
Participant
Posts: 79
Joined: Thu May 27, 2010 1:49 am

Post by bhasds »

Hi New_ds_man,

It is a vetical pivot-

Code: Select all

1 If col1 <> SV2 Then col3 Else SV1 :",": col3     SV1

2. col1  SV2(initialize with "")

3. In derivation of col3 take the output of SV1.
4.Use a remove duplicate stage after transformer to retain the last duplicate record in the group.
new_ds_man
Participant
Posts: 18
Joined: Tue Jul 08, 2008 1:12 pm

Post by new_ds_man »

Thanks much BHASDS. I now have the result based on your solution. Really appreciate your time and help.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

:evil:

Why in the heck did you feel the need to go back and remove your original question after it was answered? That's a pretty crappy thing to do.
-craig

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