Quantcast
Channel: Teradata Forums - Database
Viewing all articles
Browse latest Browse all 14773

surrogate scripts - response (1) by Raja_KT

$
0
0

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


Viewing all articles
Browse latest Browse all 14773

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>