Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 12 Mar 2007 @ 22:58:59 GMT


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


Subj:   Re: Incrementing field with an INSERT
 
From:   Barrow, Martin

That seems to have done the job:

     Insert into identity_test
     (test_Index
     , CIDPERSID)
     Select a.maxid + SUM(1) OVER (ROWS UNBOUNDED PRECEDING)
              ,888888
     from tblname , (select coalesce(max(test_index),0) as maxid from
     identity_test ) a ;

Thank you very much,

Martin



     
  <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