I am trying to run a query from my program, I am getting the below error message when I checked my logs, please provide me a solution/suggestion.
com.ibm.db2.jcc.b.SqlException: DB2 SQL error: SQLCODE: -420, SQLSTATE: 22018, SQLERRMC: DOUBLE
at com.ibm.db2.jcc.b.hh.b(hh.java:1369)
at com.ibm.db2.jcc.b.hh.c(hh.java:1356)
at com.ibm.db2.jcc.c.db.k(db.java:352)
at com.ibm.db2.jcc.c.db.a(db.java:60)
at com.ibm.db2.jcc.c.t.a(t.java:52)
at com.ibm.db2.jcc.c.tb.b(tb.java:202)
at com.ibm.db2.jcc.b.ih.ab(ih.java:1898)
at com.ibm.db2.jcc.b.ih.d(ih.java:2467)
at com.ibm.db2.jcc.b.ih.W(ih.java:525)
at com.ibm.db2.jcc.b.ih.executeUpdate(ih.java:508)
at com.test.internal.updateImp.updateRow(updateImp.java:**107**)
Code:
public int updateRow(String jobID ,Connection connect) throws Exception{
int cnt =0;
Statement stmt = null;
try {
stmt = connect.createStatement();
String query = dbConnection.UPDATE_EMPLOYEE.toString();
query = query.replace("?", jobID); //line 107
cnt = stmt.executeUpdate(query);
} catch (Exception ex) {
ex.printStackTrace();
} finally {
try{
if(stmt != null) stmt.close();
}catch(Exception ex){
ex.printStackTrace();
}
}
return cnt;
}
Query is
UPDATE INTRA.EMPLOYEE SET STATUS = 'Y' WHERE JOB_ID IN (?)