Field Definition : emp_device char(20 byte)
Value is : 99998000000008880999 (This value is present in the table)
Query : Update employes set emptime = systimestamp where emp_id = 123 and emp_device = trim(:abc); -- (works --- :abc value is '99998000000008880999 ')
Do not know what is wrong with it. Can some one please take a look and suggest a solution.
I suggest you modify your query to AVOID the use of implicit conversion of datatypes. The column value is defined as char(20) but you are providing a predicate of 'emp_device = :abc' - there are NO QUOTES around the bind variable so the value you supply will be treated as NUMERIC.
That causes Oracle to convert the table value to a number and do the comparison.
ALWAYS provide the proper datatype - NEVER rely on implicit conversion.
Use a predicate of emp_device = ':abc' and post the results.
See the description of precedence and implicit conversion in the Oracle docs.
It might be. I tried sqlplus console to do the same. It works there.
Used quotes around bind variables. Still 0 rows updated.