Archives of the TeradataForum
Message Posted: Thu, 15 Sep 2005 @ 09:47:39 GMT
Subj: | | Re: Urgent: Question on Teradata batch upsert |
|
From: | | Bob Hahn |
The example code illustrated setting the batch size via an internal 'pack' value (packCur variable) that specified to call executeBatch after
'packCur' calls to addBatdch, each passing a constructed SQL statement with embedded values.
for (j = 0; ((j < packCur) && (j < (numInserts-i)));j++) {
msStatement.addBatch("INSERT INTO INSERT_TEST VALUES ("+
rowSeq++ + "," + rowSeq++ + ");");
}
This won't be statement cached.
Prepared statement batch updates require Teradata V2R6 and JDBC 3.2.
|