JSqlParser
JSqlParser copied to clipboard
[BUG]with as (update xxxx) can't be parsed
Failing SQL Feature:
"with as (update xxx)" can't be parsed
the error is
Caused by: java.util.concurrent.ExecutionException: net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "update" "UPDATE" at line 2, column 9.
Was expecting:
"WITH"
SQL Example:
with s as (
update t_analyze_pt_detail
set top = ?,
updator = ?,
update_time = ?
where ticket_number = ?
and removed = false)
insert
into t_analyze_pt_detail
(id,
ticket_number,
creator,
create_time,
removed,
top)
select ?,
?,
?,
?,
false,
? where not exists(
select 1 from t_analyze_pt_detail
where ticket_number = ? and removed = false)
the "?" is not important, i have tried with params and got the same bug
Software Information:
- JSqlParser version:4.7
- Database:pgsql
Duplicate #1550
Duplicate #1550
thanks! Is there any progress on this problem now?