Oracle: Parser fails on CREATE VIEW ... AS WITH <PL/SQL> #2048
Which version and edition of Flyway are you using?
Using Flyway Flyway Community Edition 5.1.1 by Boxfuse
If this is not the latest version, can you reproduce the issue with the latest one as well?
(Many bugs are fixed in newer releases and upgrading will often resolve the issue)
Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin)
Which database are you using (type & version)?
Oracle 12.2.1, Ojdbc 8
Which operating system are you using?
Windows & Unix
What did you do?
(Please include the content causing the issue, any relevant configuration settings, the SQL statement that failed (if relevant) and the command you ran.)
CREATE OR REPLACE VIEW VIEW1 AS
What did you expect to see?
View created successfully.
What did you see instead?
Encountered the below error
**SQL State : 65000
:= ; not null default character**
The text was updated successfully, but these errors were encountered:
Here is the full view query:
CREATE OR REPLACE VIEW view1 AS WITH -- Total Amount Function FUNCTION WITH_TOT_AMT ( arg1 IN VARCHAR2, ARG2 IN VARCHAR2 ) RETURN NUMBER AS V_O_AMT NUMBER(8,2); BEGIN SELECT col1 INTO V_O_AMT FROM table1 A, table2 B WHERE <filters> RETURN V_O_AMT; END; -- Total quantity function FUNCTION WITH_TOT_QTY ( ARG1 IN VARCHAR2, ARG2 IN VARCHAR2 ) RETURN NUMBER IS V_O_QTY NUMBER(8,2); BEGIN SELECT col1 INTO V_O_QTY FROM table1 A, table2 C WHERE <filters> RETURN V_O_QTY; END; --Main query SELECT col1, col2, col3 ( SELECT col1, col2, col3 FROM tt1 A, tt2 B WHERE <filters> ); /
I can't seem to find documentation for this syntax anywhere, including at https://docs.oracle.com/en/database/oracle/oracle-database/12.2/sqlrf/CREATE-VIEW.html
Can you point me to the official docs regarding this?
I'm interested, too!
Are there any workarounds for this? (Something more elegant than execute immediate ...)
@axelfontaine when is the next version of flyway be released that supports my view creation syntax? Please expedite. I do not see any upgraded version yet to download. Also I do not have the privilege to build flyway with your code.
You had replied me a month back saying
"We only offer pre-release binaries to paying Pro or Enterprise customers.
If this is not an option for you, you can simply build from source yourself or wait until the next release."