Have a table called ExternalEventLog and columns as below
CREATE TABLE EXTERNALEVENTLOG
( EXTERNALLOGID NUMBER(10,0) DEFAULT ON NULL ,
FININSTKEY VARCHAR2(32),
APPLNAME VARCHAR2(64),
CONTENT CLOB,
EVENTNAME VARCHAR2(32),
CREATEDBY VARCHAR2(32),
REQUID VARCHAR2(64),
EVENTDATE DATE,
DUID VARCHAR2(32),
STATUS VARCHAR2(32),
CONSTRAINT PK_EXTERNALEVENTLOG PRIMARY KEY (EXTERNALLOGID)
);
if I am using stand alone SQL it is working fine with default null on clause
But the same thing when I am calling from plsql block this is erroring out with
to_date( TO_CHAR(JSON_VALUE(e.content, '$.timestamp')) DEFAULT NULL ON CONVERSION ERROR, 'YYYY-MM-DD HH24:MI:SS') col1,
Error :
ORA-49307 : This argument must be literal or bind variable, however if I remove the DEFAULT NULL ON CONVERSION ERROR this is working fine.
any thoughts how to handle this in PLsql
THanks in advance
I am using 12.2 oracle version