Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 19 Sep 2003 @ 10:46:34 GMT


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


Subj:   Re: How to create sys generated keys
 
From:   Narayan Murthy K S

Instead of creating a trigger which would do the update, how about executing a batch statement as:

INSERT INTO tptb1 (  a1,a2,a3,a4  )
   SELECT
        :cc1 ,:cc2 (Date, Format 'YYYY/MM/DD') ,:cc3, NEXTREC
      FROM SEQ WHERE TABLENAME = 'TBTB1'
; UPDATE SEQ SET NEXTREC = NEXTREC + 1 WHERE TABLENAME = 'TPTB1';

But I am not sure if a load utility would support an UPDATE statement. I guess TPUMP supports.

Narayan.



     
  <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