Concatination

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
srinu.dst
Participant
Posts: 6
Joined: Wed Apr 09, 2008 11:19 pm

Concatination

Post by srinu.dst »

Hi,
I have 3 records,
1 Srini
1 vasa
2 reddy

now i want o/p like this
1 Srinivasa
2 reddy

could u please help in this

Thanks in advance.
Regards,
Srinu.Reddy
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Stage variables to do group change detection and concatenate the 2nd column within a group. Then the Remove Duplicates stage set to retain the last 'duplicate' will give you what you want.
-craig

"You can never have too many knives" -- Logan Nine Fingers
nagarjuna
Premium Member
Premium Member
Posts: 533
Joined: Fri Jun 27, 2008 9:11 pm
Location: Chicago

Post by nagarjuna »

Use sort stage with key column change option and use transformer to concatenate
Nag
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

... and then use the Remove Duplicates stage to retain the last record per group. :wink:
-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 »

... making sure you use a key-based partitioning algorithm and sort on the key (in this case a stable sort is indicated).
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