Please start any new threads on our new 
    site at https://forums.sqlteam.com.  We've got lots of great SQL Server
    experts to answer whatever question you can come up with.
    
        | 
                
                    | 
                            
                                | Author | Topic |  
                                    | SavithaStarting Member
 
 
                                        2 Posts | 
                                            
                                            |  Posted - 2013-11-11 : 05:48:51 
 |  
                                            | i have a table which has 2 columsn one column is table name another suurogate key value.which intail value is 0.we have been asked to generate values using the surrogate key values as ID column.Once the data is loaded into the table, the max id value should be updated to suuorgate max value column.Next the if the packae runs, it should read from column value and increment the values by 1. |  |  
                                    | visakh16Very Important crosS Applying yaK Herder
 
 
                                    52326 Posts | 
                                        
                                          |  Posted - 2013-11-11 : 06:24:35 
 |  
                                          | just add update statment like UPDATE TableSET SurrogateKey = (SELECT MAX(IDCol) FROM YourTable)WHERE TableName = 'Your table name here'------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |  
                                          |  |  |  
                                |  |  |  |