Skip to content

[BUG] JSQLParser Version : RDBMS : net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "(" "(" #2075

@wustydj

Description

@wustydj

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions