Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]with as (update xxxx) can't be parsed #1916

Closed
coach00 opened this issue Dec 14, 2023 · 3 comments
Closed

[BUG]with as (update xxxx) can't be parsed #1916

coach00 opened this issue Dec 14, 2023 · 3 comments

Comments

@coach00
Copy link

coach00 commented Dec 14, 2023

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
@coach00 coach00 changed the title [BUG]with 昂撒() [BUG]with as (update xxxx) can't be parsed Dec 14, 2023
@manticore-projects
Copy link
Contributor

Duplicate #1550

@coach00
Copy link
Author

coach00 commented Dec 15, 2023

Duplicate #1550

thanks! Is there any progress on this problem now?

@manticore-projects
Copy link
Contributor

This has been resolved recently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants