Hi Reddy,
There are few ways of generating surrogate, but can't put the script because of restrictions of company's policies.
One way you can generate a sequence.
Another way is create lookup table. Put the key fields which you are getting from source there along with sk_col. Join your source table with lookup table thru left outer join.
Now to get increment ,you need to select max of sk_col + row_number() over key fields.......
Script I can't share.
Cheers,
Raja
Hi Reddy,
There are few ways of generating surrogate, but can't put the script because of restrictions of company's policies.
One way you can generate a sequence.
Another way is create lookup table. Put the key fields which you are getting from source there along with sk_col. Join your source table with lookup table thru left outer join.
Now to get increment ,you need to select max of sk_col + row_number() over key fields.......
Script I can't share.
Cheers,
Raja