Home » Developer & Programmer » JDeveloper, Java & XML » APPEND Hint on executeBatch
APPEND Hint on executeBatch [message #226830] Mon, 26 March 2007 13:25
scottwmackey
Messages: 505
Registered: March 2005
Senior Member
I have the following code
public class LPResultPersist {
    public static long[] persist (Connection con, ArrayList<LPHeader> lps)  throws Exception {
        PreparedStatement itvlStmt = con.prepareStatement( 
            " INSERT /*+APPEND*/ INTO lp_itvl_stg ( "
          + "       lp_header_stg_id "
          + "      ,itvl_seq_num "
          + "      ,itvl_status "
          + "      ,itvl_ts "
          + " ) "
          + " VALUES ( "
          + "       ? "
          + "      ,? "
          + "      ,? "
          + "      ,? "
          + " ) ");

        try {
	        for (int lpNum=0; lpNum < lps.size(); lpNum++) {
	            for (int itvlNum=0; itvlNum < lp.itvl.size(); itvlNum++) {
	                LPItvl itvl = lp.itvl.get(itvlNum);
	                itvlStmt.setLong( 1, loadId);
	                itvlStmt.setLong( 2, itvl.itvlSeqNum);
	                itvlStmt.setBytes( 3, new byte[]{itvl.itvlStatus});
	            }        } // lpHeader
        }
        finally {
	        try {itvlPersistStatus = itvlStmt.executeBatch();} catch (SQLException e){}
        }
        return loadIds;
    }
}
My question pertains to the APPEND hint in the insert statement. Does it do anything? I am absolutely certain that if you run this in SQL, the hint is ignored.
INSERT /*+APPEND*/ INTO t VALUES(1);
It is only used with the INSERT INTO/SELECT FROM syntax. Does executeBatch() work around this somehow? I am guessing it doesn't, but I would like that confirmed.

Thanks,
Scott
Previous Topic: Compilation errors
Next Topic: Hi
Goto Forum:
  


Current Time: Fri Dec 09 03:54:13 CST 2016

Total time taken to generate the page: 0.14545 seconds