Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 12 Mar 2007 @ 21:15:26 GMT


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


Subj:   Re: Incrementing field with an INSERT
 
From:   Nimmala, Meher Tej

Hi,

I hope this helps u.

     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 ;

Thanks

Meher Nimmala



     
  <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