Oracle SQL syntax: with clause

I am currently using the Java version of Generic SQL Parser for Oracle for some relatively complex SQL SQL queries.

As in my case, I do not have access to any Oracle database, but I only have SQL statements in the file, which I come across with some statements in which the parser fails, one of them boils down to the following.

select id from (
with foo as (
    select bar from sometable
)
select *
from foo
)

WITH clause can be parsed without problems if not nested.

with foo as (
    select bar from sometable
)
select *
from foo

Do I have an error in the parser or in the instruction?

Best, Will

+3
source share
2 answers

The SQL statement is valid, so I think the parser simply cannot handle it.

To make sure, try running SQL in SQL Plus.

+2

Oracle ( ).
ANSI SQL, , .

+2

All Articles