|
|
Archives of the TeradataForum
Message Posted: Fri, 19 Sep 2003 @ 10:46:34 GMT
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.
| |