hi,
help in the below query
How do we use surrogate keys? Is it possible to use two surrogate keys in same server job? if possible will it be correct or give errors?
thank you
jonam
Query on surrogate keys
Moderators: chulett, rschirm, roy
In the SDK included with DataStage there is a function called KeyMgtGetNextValue. It updates a hash file called SDKSequences. You need to put the current max surrogate key in this hash file. Most use a job that has a parameter for table and key name.
select max(#KeyName#) from #TableName#;
This is output into hash file SDKSequences with the TableName as the key. This fails when you have more than one surrogate key in a table. So we changed it to use KeyName as the key value in the hash file. The routine will not have to be changed only the job.
select max(#KeyName#) from #TableName#;
This is output into hash file SDKSequences with the TableName as the key. This fails when you have more than one surrogate key in a table. So we changed it to use KeyName as the key value in the hash file. The routine will not have to be changed only the job.
Mamu Kim