You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SQL file with multiple statements inside gives parsing error if one of the statements is "with_compound_statement" with "update_statement" inside.
Although separate "with_compound_statement" with "update_statement" inside is parsed correctly.
Expected Behaviour
no parsing errors
Observed Behaviour
SQL file with multiple sql statements is not parsed if one of the statements is contains ("WITH-UPDATE"):
select * from tbl1;
with src as
(
select src.cc_id from dst
join src on src.rn = 1
)
update dst
set rn = rn - 1
from dst
join src on dst.cc_id = src.cc_id;
select * from tbl1;
Variants which are parsed well :
multiple sql-statements code with GO after the "WITH-UPDATE" ;
multiple sql-statements without any statements after "WITH-UPDATE" ;
multiple sql-statements with any combinations having just statement "UPDATE" (not combination "WITH-UPDATE")
just one sql statement "WITH-UPDATE"
select * from tbl1;
with src as
(
select src.cc_id from dst
join src on src.rn = 1
)
update dst
set rn = rn - 1
from dst
join src on dst.cc_id = src.cc_id;
go
select * from tbl1;
Dialect
TSQL
Version
Python 3.9
SQLFluff 0.8.2
The text was updated successfully, but these errors were encountered:
SQL file with multiple statements inside gives parsing error if one of the statements is "with_compound_statement" with "update_statement" inside.
Although separate "with_compound_statement" with "update_statement" inside is parsed correctly.
Expected Behaviour
no parsing errors
Observed Behaviour
SQL file with multiple sql statements is not parsed if one of the statements is contains ("WITH-UPDATE"):
Variants which are parsed well :
multiple sql-statements code with GO after the "WITH-UPDATE" ;
multiple sql-statements without any statements after "WITH-UPDATE" ;
multiple sql-statements with any combinations having just statement "UPDATE" (not combination "WITH-UPDATE")
just one sql statement "WITH-UPDATE"
Dialect
TSQL
Version
Python 3.9
SQLFluff 0.8.2
The text was updated successfully, but these errors were encountered: