0

Sql Query:

 UPDATE_CHILD=UPDATE ANALYSIS_EXEC_CHILD SET STATUS = :tostatus
 WHERE PARENT_EXEC_ID = :parentId AND STATUS IN (:currentStatus)

Java code:

sql = propUtil.getPropertyValue("UPDATE_CHILD");
paramMap = new MapSqlParameterSource();
paramMap.addValue("tostatus", toStatus);
paramMap.addValue("parentId", parentExecId);
paramMap.addValue("currentStatus", Arrays.asList(currentStatuses.toArray()));
updateStatus = this.jdbcTemplate.update(sql,paramMap);

Getting Error:

SQL state [99999]; error code [17004]; Invalid column type; nested exception is java.sql.SQLException: Invalid column type JDBC

Veera
  • 3,412
  • 2
  • 14
  • 27
Karthi
  • 1
  • 1
  • 2
  • I think this link http://stackoverflow.com/questions/8489138/jdbctemplate-in-clause-for-string-elements could be helpful – syllabus Dec 10 '14 at 08:12
  • Ideally this should work. I would suggest doing some troubleshooting like 1. Remove status from the where clause so as to know if its because of the list parameter. 2. Enable spring trace level logs to see if that gives more insights. – Andy Dufresne Dec 11 '14 at 07:28

0 Answers0