Always check against the Latest SNAPSHOT of JSQLParser and the Syntax Diagram
Failing SQL Feature:
- When multiple nesting is performed using concat, parsing fails
SQL Example:
select concat('the',cast(t.dim_week_upd as Nullable(String)),'week',cast(t.min_date as Nullable(String)),'-',cast(t.max_date as Nullable(String)),'') as `weekofyear` from table
Software Information:
- JSqlParser version 5.0
- Database (e. g. Oracle, MS SQL Server, H2, PostgreSQL, IBM DB2 )
Tips:
Detailed error log:
net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "(" "("
at line 1, column 14.
Was expecting one of:
"."
"::"
"^"
<EOF>
<ST_SEMICOLON>
at net.sf.jsqlparser.parser.CCJSqlParser.generateParseException(CCJSqlParser.java:42285)
at net.sf.jsqlparser.parser.CCJSqlParser.jj_consume_token(CCJSqlParser.java:42106)
at net.sf.jsqlparser.parser.CCJSqlParser.Statement(CCJSqlParser.java:341)