I am using SQL DML scripts to do some data inserting into a table; the select has a with clause and with clause has a function and additional with clause .
But if I run only the part from with to the end without the insert, it runs fine.return results. It seems the program does not like with function when used with insert statement.
I read from article Ask Tom, it says to add /*+ WITH_PLSQL */ in the insert statement and add a / at end of the file. but when I run it, it gives another error:
Insert /*+ WITH_PLSQL */ into tab1(col)
FUNCTION test_date (d VARCHAR2)
SELECT TO_DATE (d, 'MM/YYYY') INTO v_date FROM DUAL;
AS (select test_date(sysdate) col1
select * From graduationDay