Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 15 Sep 2005 @ 09:47:39 GMT


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


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.



     
  <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