Always check against the Latest SNAPSHOT of JSQLParser and the Syntax Diagram
Failing SQL Feature:
- Sql parse is failing when a $ in a SQL statement is enclosed in $$
SQL Example:
- Simplified Query Example, focusing on the failing feature
select CAST($$Spend sample failure $10$$ AS STRING)
Software Information:
- JSqlParser version : 5.3
- Database (Snowflake)
Link:
Please write in English and avoid Screenshots (as we can't copy and paste content from it).
The Sql parse failed as it contains $10 removing the $ fixed the issue.
http://jsqlformatter.manticore-projects.com/jsqlformatter/demo.html?args=-c%20M4UwNiDGAuAEDCBBAygFQBQBJMDMCGAlmAK4BOIs0IwcwADiAHYAmsmAjAAzawqxoAlAJIA5AOIBKANxA$$$
Do provide Links or References to the specific Grammar and Syntax you are trying to use.
Snowflake supports $$...$$ syntax , so I am trying to use select CAST($$test sample failure $10$$ AS STRING)
Error
Encountered unexpected token: "sample" <S_IDENTIFIER> Was expecting one of: "AS"