Hi everyone,
I am working on Datastage 7.5.1 server version running on Unix with DB2 database.DS Client is on windows XP.
When i use the inbuilt fuction KeyMgtGetNextValue(%dummy%) in order to generate a surrogate key, it works fine.For example for 5 records the last key generated is 5.
However when i run the job again, the next key that is generated is 6 onwards and it does not reset the value and assign the key value 1.
I would like to know how will i be able to reset the value of the surrogate key in the memory.Is there some function which would help me in this regard?
Thanks in advance.
Cheers!
Doubt regarding surrogate key.
Moderators: chulett, rschirm, roy
-
- Charter Member
- Posts: 19
- Joined: Sun Jul 20, 2003 4:29 am
Re: Doubt regarding surrogate key.
Can I ask, why you need to worry about the surrogate key values ? What is the problem if the surrogate key value is not reset to 1 ?rishabh wrote:Hi everyone,
I am working on Datastage 7.5.1 server version running on Unix with DB2 database.DS Client is on windows XP.
When i use the inbuilt fuction KeyMgtGetNextValue(%dummy%) in order to generate a surrogate key, it works fine.For example for 5 records the last key generated is 5.
However when i run the job again, the next key that is generated is 6 onwards and it does not reset the value and assign the key value 1.
I would like to know how will i be able to reset the value of the surrogate key in the memory.Is there some function which would help me in this regard?
Thanks in advance.
Cheers!
Thanks,
Raghu
Re: Doubt regarding surrogate key.
I don't see any reason why you would need to reset your surrogate key. But, if you are using it more like a sequence, then follow Craig's suggestion with @INROWNUM. If, you still feel the need to reset it, do a search on "UPDATE SDKSequences".
gateleys
gateleys