Why does One Automation report Oracle errors when DollarUniverse does not?
I create the following piece of code as a simple example.
Only when I call the package procedure from within One Automation do I get the Oracle error ORA-01858.
Before you start pointing out issues -- Yes, I am aware it is useless piece of code and YES I am aware of the error in the NVL function.
create or replace PACKAGE date_pkg AUTHID CURRENT_USER AS
PROCEDURE do_date;
END date_pkg;
/
create or replace PACKAGE BODY date_pkg AS
PROCEDURE do_date AS
this_date DATE;
BEGIN
WITH x AS (SELECT TO_DATE(NULL, 'YYYY-MM-DD') AS my_date FROM DUAL)
SELECT my_date INTO this_date FROM x WHERE NVL(my_date, '01-JAN-1900') = TO_DATE('2019-11-27', 'YYYY-MM-DD');
EXCEPTION
WHEN OTHERS THEN
IF SQLCODE = -01858 THEN
DBMS_OUTPUT.PUT_LINE('Received an oracle exception');
END IF;
RAISE;
END;
END date_pkg;
------------------------------
Newbie
------------------------------