I am using the OracleScript class to try to execute a DML command sequence. The script file contains, among others, the command to create a view:
Code: Select all
CREATE OR REPLACE VIEW test_schema.view1 AS
WITH
FUNCTION func1 RETURN VARCHAR2 IS
BEGIN
RETURN 'test';
END;
(
SELECT col1, func1 FROM test_schema.table1;
);
/
Code: Select all
ORA-06553: PLS-103: Encountered the symbol "end-of-file" when expecting one of the following:
* & = - + ; < / > at in is mod remainder not rem
<an exponent (**)> <> or != or ~= >= <= <> and or like like2
like4 likec between || multiset member submultiset
I think it is related to the use of syntax that allows to define functions and procedures in the view body.
This functionality is available from Oracle 12.
Some tips on how to run this script correctly?
(I am using Devart.Data.Oracle v.9.9.867 and Oracle 12c2)