Page 1 of 1

How can we increment the surrogate key value?

Posted: Wed Mar 21, 2007 2:39 am
by mallikharjuna
How can we increment the surrogate key value for every insert in to target database?

Posted: Wed Mar 21, 2007 3:20 am
by us1aslam1us
Store the max value from the table into a hashed file. In the transformer, add this value with @OUTROWNUM for each insert.

Re: How can we increment the surrogate key value?

Posted: Wed Mar 21, 2007 6:02 am
by ray.wurlod
mallikharjuna wrote:How can we increment the surrogate key value for every insert in to target database?
By adding one to the previous value, which you initialize from the target table.

Or by using a sequence in the database.

There are key management routines in the SDK, but no way to initialize these out of the box - but that is possible, search the forum to find out how.