seq number

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
rmeenakumari822
Participant
Posts: 30
Joined: Sat Oct 25, 2008 9:09 pm
Location: chennai

seq number

Post by rmeenakumari822 »

Hi ,

Can any one give suggestion.....

i have a source like

name address
anil ADD1
priya ADD1
sunil ADD1
anil ADD2
sunil ADD2
anil ADD3
......


i need the target like

name value address
anil 01 ADD1
anil 02 ADD2
anil 03 ADD3
sunil 01 ADD1
sunil 02 ADD2
priya 01 ADD1
......

Thanks,
priya
Kryt0n
Participant
Posts: 584
Joined: Wed Jun 22, 2005 7:28 pm

Post by Kryt0n »

Best guess given information...

Sort input on name, use stage variables to determine change of name and increment a second stage variable when names are the same, reset when different...
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Even easier, sort with a Sort stage and generate a Key Change column in that to detect change of value. Then do the stage variables thing in a downstream Transformer stage.
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