Spring JdbcDaoSupport - Binding parameters in Batch update .
Posted on 2013-11-11
I am trying to perform a batch update of different sql queries not the same update statement. The option that is availble is "int batchUpdate(String sql) " .
in this case I will have to generate sql statement with values using + operator and pass it , i there a way I can dynamically bind values into the query String ?
Example :Query1 === "Update dept where set hours ="+ timeVariable +" where employee = "+employeeNm;
Query2 === "Update employee where set food="+ foodVariable +" where employee = "+employeeNm;