METRICS: ORA-01858: A NON-NUMERIC CHARACTER WAS FOUND WHERE A NUMERIC WAS EXPECTED (Doc ID 1078379.1)

Last updated on OCTOBER 16, 2016

Applies to:

Oracle Utilities Work and Asset Management - Version 1.7.15 to 1.9.0 [Release 1.7 to 1.9]
Information in this document applies to any platform.
***Checked for relevance on 12-NOV-2013***

Goal


When adding a filter value to the metric sdbp_metric_late_pm of work_required_date <=sysdate-30, Batch fails with the following error:

ERROR: Code-1- Failed: ORA-01858: a non-numeric character was found where a numeric was expected - Attempting to execute
"SELECT COUNT(*) CURRENT_READING
FROM SA_WORK_ORDER
WHERE
WORK_TYPE = 'P'
AND WORK_REQUIRED_DATE < SYSDATE
AND WORK_STATUS NOT IN ('FINISHED', 'CLOSED', 'REJECTED', 'CANCELED')
AND 1 = 1
AND SA_WORK_ORDER.DEPARTMENT = '51'
AND SA_WORK_ORDER.WORK_REQUIRED_DATE <= '(SYSDATE - 30)'".
Attempting to execute "sdbp_metric_late_pm(:in_param_1,
:out_param_1, :out_param_2, :out_param_3, :out_param_4);"
with WHERE CLAUSE " 1 = 1
AND SA_WORK_ORDER.WORK_REQUIRED_DATE <= '(SYSDATE - 30)'".


A specific date can be entered as a filter value and it will work-but not SYSDATE or SYSDATE -X.



Solution

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms