I'm currently having a similar issue to the one in #1747 that was fixed by #1748.
The INTERSECT keyword is working as expected, but when using EXCEPT without a WHERE clause, I'm getting a parser error.
Expected "(", ",", "--", "/*", ";", "CROSS", "EXCEPT", "FULL", "GROUP", "HAVING", "INNER", "INTERSECT", "INTO", "JOIN", "LEFT", "LIMIT", "OFFSET", "ORDER", "RIGHT", "UNION", "WHERE", "WINDOW", [ \t\n\r], or end of input but "S" found.
Database Engine
which database engine does your SQL running on? such as MySQL, PostgreSQL.
noql
To Reproduce
-the SQL that be parsed
SELECT *
FROM "top-rated-films"
EXCEPT
SELECT *
FROM "most-popular-films"
ORDER BY name
-the node-sql-parser version
5.2.0
-the node version
v16.20.2
Expected behavior
A clear and concise description of what you expected to happen.
It should build the AST correctly
Screenshots
If applicable, add screenshots to help explain your problem.
N/A
Additional context
Add any other context about the problem here.
If I provide a where statement as follows, it does parse successfully:
SELECT *
FROM "top-rated-films"
WHERE 1=1
EXCEPT
SELECT *
FROM "most-popular-films"
ORDER BY name
Describe the bug
I'm currently having a similar issue to the one in #1747 that was fixed by #1748. The
INTERSECT
keyword is working as expected, but when usingEXCEPT
without a WHERE clause, I'm getting a parser error.Database Engine which database engine does your SQL running on? such as MySQL, PostgreSQL.
noql
To Reproduce
-the SQL that be parsed
-the node-sql-parser version
5.2.0
-the node versionv16.20.2
Expected behavior A clear and concise description of what you expected to happen. It should build the AST correctly
Screenshots If applicable, add screenshots to help explain your problem. N/A
Additional context Add any other context about the problem here.
If I provide a where statement as follows, it does parse successfully: