We had written one DB2 stored procedure and worked fine. This will be called remotely by Java application. then we changed two cursors where condition for Timestamp. we used
substr(char(timestamp),1,16) = substr(char(:variable),1,16). This is working fine through QMF and we tested the stored procedure as batch program, it worked there also. but when this was called by Java application, then it's not working. It's saying successful but not updating or inserting anything in the database. Please if anyone have or encountered this kind of issue in Stored procedure, Please help me.
besides performance wise it would be better to make 2 variables :
1 containing fe. : '2011-01-12-12.06.00.000000'
and 1 cont. : '2011-01-12-12-06.59.999999'
and rewrite your query as "timestamp between :variable1 and variable2"