I've select with 'WITH' clause:
with
alias1 as (select...),
alias2 as (select ... from alias1),
alias3 as (select col1, col2 ... from alias2)
select col1,col2 from alias3
I tryied to create view using:
create view ex_view as (
with
alias1 as (select...),
alias2 as (select ... from alias1),
alias3 as (select col1, col2 ... from alias2)
select col1,col2
from alias3
)
When I tried to execute this create statement got 'unsupported use of WITH clause'
How to create view based on my select statement properely?
Try dropping the parentheses:
create view ex_view as
with
alias1 as (select...),
alias2 as (select ... from alias1),
alias3 as (select col1, col2 ... from alias2)
from alias3;