I'm trying to use this SQL in my spring batch reader. The SQL seems to have a problem:
select DISTINCT ces.COR_ENBL_STG_ID
from HBX_BATCH_COR_ENBL_STG ces
Inner JOIN HBX_INDV_NEG_ACTION ina ON ces.INDV_ID=ina.INDV_ID
where ces.DISP_PROCESSED_FLAG='Y'
AND ina.NEG_ACTION_RUN_RSN_CD in('11054','11055','11065')
AND ces.PGM_BGN_DT+90<'#{jobExecutionContext['latest.completed.startTime']}'
The value of latest.completed.start.time is coming as '07-Oct-16 12:38:58.000000109 PM' from a tasklet using jdbctemplate and hence the SQL is throwing the following error : ORA-01858: a non-numeric character was found where a numeric was expected.
Just FYI the column ces.PGM_BGN_DT is a Date Type. I tried TO_DATE function but it didn't help. Any suggestions please?