Hi,
I am trying to get a sequential number in datastage.For example if I have 100 rows in my source, the couner column should contain 1 to 100.
How to do it in datastage?
Regds,
DD
How to get the sequence number in datastage
Moderators: chulett, rschirm, roy
Re: How to get the sequence number in datastage
Do you need the row number or a number that has to be generated for Surrogate key which is unique every time you run this job and insert data into DW.
for the latter: keyMgtGetNextValue('<key>') shld be used.
for the latter: keyMgtGetNextValue('<key>') shld be used.
Re: How to get the sequence number in datastage
Thanks,
I have got it using @INROWNUM function.
Regds,
Dilip
I have got it using @INROWNUM function.
Regds,
Dilip
Dilip Das
Re: How to get the sequence number in datastage
that is right for the row number coming into the Transformer.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
@OUTROWNUM may be a better choice.
If you later add constraints to your Transformer stage, you will get gaps in the number sequence (which may not matter if they are only being used for uniqueness).
@INROWNUM counts the rows coming in to a Transformer stage.
@OUTROWNUM counts the rows leaving a Transformer stage.
If you later add constraints to your Transformer stage, you will get gaps in the number sequence (which may not matter if they are only being used for uniqueness).
@INROWNUM counts the rows coming in to a Transformer stage.
@OUTROWNUM counts the rows leaving a 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.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.