I am getting org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL
UPDATE responses
SET version_no = ( version_no + 1 ),
read_status = 0,
tslastmodified = SYSDATE
WHERE responseid IN (SELECT responseid
FROM responses
WHERE read_status = 1
AND tslastmodified < SYSDATE - 45 / ( 24 * 60 )
AND id IN (SELECT id
FROM emp))
; SQL state [24000]; error code [1002]; ORA-01002: fetch out of sequence ; nested exception is java.sql.SQLException: ORA-01002: fetch out of sequence
JAVA code :
getJdbcTemplate().queryForObject(SurveyQuery.UPDATE_INPROCESS, Integer.class);
Please let me know what is wrong in above query