error: ORA-00907: missing right parenthesis
I'm getting the following error executing and SQL query:
ORA-00907: missing right parenthesis
The query is:
UPDATE BS_SERVICE_ORDER_REQUEST
SET
status = :conf_status
, dt_blocking = to_date(:conf_dt_blocking :dt_blocking_ind,'YYYYMMDDHH24MISS')
, confirmation = 'R'
WHERE case_num = :conf_case_num
AND service_id = '+55' || :conf_service_id
AND service_type = DECODE (:conf_service_type, '001', 'FON' ,'003', 'CCD', 'FON')
AND reason_code = :conf_reason_code;
This query is part of a loop and is executed successfully for many rows. After running for a while the program abends returning this SQL error. The error occurs randomly so it doesn't look like a data problem since it happen all the time updating different rows.
Any suggestion on what could be the reason of this error.
Many thanks,
Lorenzo Santacana