I needed to generate sequnce number like
a-1
a-2
b-1
b-2
how can we do in datastage
how to generate sequence numbers
Moderators: chulett, rschirm, roy
Use stage variable in a transform stage
Variable: "ACount", derivation "IF In.Column="A" THEN ACount + 1 ELSE ACount
Variable: "BCount", derivation "IF In.Column="B" THEN BCount + 1 ELSE BCount
That gives you a numeric value for subsequent occurrences of a string and you can do the rest from that.
Variable: "ACount", derivation "IF In.Column="A" THEN ACount + 1 ELSE ACount
Variable: "BCount", derivation "IF In.Column="B" THEN BCount + 1 ELSE BCount
That gives you a numeric value for subsequent occurrences of a string and you can do the rest from that.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: