Sequence number generation

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
ithirak_17
Participant
Posts: 17
Joined: Mon Sep 10, 2007 3:24 am

Sequence number generation

Post by ithirak_17 »

Hi All,

I have one clarification in generating the sequence number.

File layout:
12|44
12|43
14|22
14|21
16|29

So depend on the first column if it same number ie 12 i need generate the sequence number from 1 and proceeds further if the first column value changes i need to reset again to 1 to generate the sequence.
Example:
column1 |column2|seqno
12|44|1
12|43|2
14|22|1
14|21|2
16|29|1.

Help me out in solving this issue.

Thanks in advance.
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Check this thread. Similar and almost identical.

viewtopic.php?t=129330
ithirak_17
Participant
Posts: 17
Joined: Mon Sep 10, 2007 3:24 am

Post by ithirak_17 »

Thanks a lot it works!!!

Sainath.Srinivasan wrote:Check this thread. Similar and almost identical.

viewtopic.php?t=129330
Post Reply