encountered unexpected token:<eof> jsqlparser postgresql

95 views Asked by At

When I passed this postgresql query in jsql parser it gave this error but when I run this in postgresql query console it work without any problem. whats the reason ?

NOTE: this error also occurred when I worked with apache calcite.

Query:

BEGIN;SELECT * FROM general.projects_bank;COMMIT;

error:

net.sf.jsqlparser.parser.ParseException: Encountered unexpected token:<EOF>
    at line 1, column 49.

Was expecting one of:

"("
"ALTER"
"ANALYZE"
"BEGIN"
"CALL"
"COMMENT"
"COMMIT"
"CREATE"
"DECLARE"
"DELETE"
"DESCRIBE"
"DROP"
"END"
"EXEC"
"EXECUTE"
"EXPLAIN"
"GRANT"
"INSERT"
"MERGE"
"PURGE"
"RENAME"
"REPLACE"
"RESET"
"ROLLBACK"
"SAVEPOINT"
"SET"
"SHOW"
"TRUNCATE"
"UPDATE"
"UPSERT"
"USE"
"VALUE"
"VALUES"
"WITH"
<K_SELECT>
0

There are 0 answers