Page 1 of 1

Concatenating strings for the same nonunique key values

Posted: Mon Sep 17, 2012 4:29 pm
by I_Server_Whale
Hi all,

I have the following input data:

Code: Select all

Input 
          
1       Tiger           
1       Mohan          
1       Chow           
2       Christie
2       John
3       Ruth
3       Babe
and I'm looking to get this data in the following output format:

Code: Select all

Output

1        Tiger Mohan Chow
2        Christie John
3        Ruth Babe
What is the best way to code this via a PX job? Greatly appreciate your inputs!

TIA,
Whale.

Posted: Mon Sep 17, 2012 5:17 pm
by chulett
Well, at its heart that is basically a vertical pivot of rows to columns. Clarify for us your "output format" is destined for what - a flat file, a table? That would drive the post-pivot shenanigans you'd need, it seems to me.

Posted: Mon Sep 17, 2012 10:51 pm
by ray.wurlod
Pivot followed by Column Export