-
Notifications
You must be signed in to change notification settings - Fork 442
Closed as not planned
Labels
Description
Input data
Which SQL and options did you provide as input?
select dt
from table
where dt between '2024-06-11' and '2024-06-11结尾引号没有补全时,代码格式化报错
Expected Output
SELECT
dt
FROM
table
WHERE
dt BETWEEN '2024-06-11' AND '2024-06-11'Actual Output
An Unexpected Error Occurred
Parse error: Unexpected "'2024-06-1" at line 3 column 35. This likely happens because you're using the default "sql" dialect. If possible, please select a more specific dialect (like sqlite, postgresql, etc).
Please report this at [Github issues page.](https://github.com/sql-formatter-org/sql-formatter/issues)
Stack Trace:
Error: Parse error: Unexpected "'2024-06-1" at line 3 column 35.
This likely happens because you're using the default "sql" dialect.
If possible, please select a more specific dialect (like sqlite, postgresql, etc).
at HR.createParseError (https://unpkg.com/sql-formatter@latest/dist/sql-formatter.min.js:1:196454)
at HR.tokenize (https://unpkg.com/sql-formatter@latest/dist/sql-formatter.min.js:1:196240)
at VR.tokenize (https://unpkg.com/sql-formatter@latest/dist/sql-formatter.min.js:1:197919)
at wR.tokenize (https://unpkg.com/sql-formatter@latest/dist/sql-formatter.min.js:1:233133)
at wR.reset (https://unpkg.com/sql-formatter@latest/dist/sql-formatter.min.js:1:203343)
at T.O.feed (https://unpkg.com/sql-formatter@latest/dist/sql-formatter.min.js:1:4085)
at Object.parse (https://unpkg.com/sql-formatter@latest/dist/sql-formatter.min.js:1:233296)
at tA.parse (https://unpkg.com/sql-formatter@latest/dist/sql-formatter.min.js:1:233491)
at tA.format (https://unpkg.com/sql-formatter@latest/dist/sql-formatter.min.js:1:233017)
at oA (https://unpkg.com/sql-formatter@latest/dist/sql-formatter.min.js:1:236312)Usage
- How are you calling / using the library?
- What SQL language(s) does this apply to?
- Which SQL Formatter version are you using?