Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 24 May 2000 @ 15:05:19 GMT


     
  <Prev Next>   <<First <Prev Next> Last>>  


Subj:   Re: Surrogate keys
 
From:   Jim Downey

I don't know if this will help but we use a process where we compare the new data to the old data. If the new data is represented in the old data, we inherit the surrogate key. If the new data is not represented (and it needs a new key) then we rank the data using the RANK function. This gives each row a number from 1 to n. We then take max(old data) and add it to the new data. For example if our old data had keys from 1 to 1000 and the new data had ranked from 1 to 20, when we merge the new data with the old then we add the max (1000) to each rank giving us new values from 1001 to 1020.



     
  <Prev Next>   <<First <Prev Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023