Always check against the Latest SNAPSHOT of JSQLParser and the Syntax Diagram
Failing SQL Feature:
at io.gitee.wxpid1.postgresql.utils.MysqlToPgUtils.alterTableSql(MysqlToPgUtils.java:887)
at io.gitee.wxpid1.postgresql.test.MysqlToPgUtilsTest.indexTest(MysqlToPgUtilsTest.java:126)
Caused by: net.sf.jsqlparser.JSQLParserException: net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "ASC" "ASC"
at line 2, column 43.
Was expecting one of:
")"
","
at net.sf.jsqlparser.parser.CCJSqlParserUtil.parseStatement(CCJSqlParserUtil.java:352)
at net.sf.jsqlparser.parser.CCJSqlParserUtil.parse(CCJSqlParserUtil.java:125)
at net.sf.jsqlparser.parser.CCJSqlParserUtil.parse(CCJSqlParserUtil.java:91)
at net.sf.jsqlparser.parser.CCJSqlParserUtil.parse(CCJSqlParserUtil.java:64)
at io.gitee.wxpid1.postgresql.utils.MysqlToPgUtils.alterTableSql(MysqlToPgUtils.java:765)
... 1 more
Caused by: java.util.concurrent.ExecutionException: net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "ASC" "ASC"
at line 2, column 43.
Was expecting one of:
")"
","
at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:124)
at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:207)
at net.sf.jsqlparser.parser.CCJSqlParserUtil.parseStatement(CCJSqlParserUtil.java:345)
... 5 more
Caused by: net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "ASC" "ASC"
at line 2, column 43.
Was expecting one of:
")"
","
at net.sf.jsqlparser.parser.CCJSqlParser.generateParseException(CCJSqlParser.java:53111)
at net.sf.jsqlparser.parser.CCJSqlParser.jj_consume_token(CCJSqlParser.java:52929)
at net.sf.jsqlparser.parser.CCJSqlParser.ColumnsNamesList(CCJSqlParser.java:28854)
at net.sf.jsqlparser.parser.CCJSqlParser.AlterExpression(CCJSqlParser.java:30776)
at net.sf.jsqlparser.parser.CCJSqlParser.AlterTable(CCJSqlParser.java:32478)
at net.sf.jsqlparser.parser.CCJSqlParser.Alter(CCJSqlParser.java:32406)
at net.sf.jsqlparser.parser.CCJSqlParser.SingleStatement(CCJSqlParser.java:547)
at net.sf.jsqlparser.parser.CCJSqlParser.Statement(CCJSqlParser.java:413)
SQL Example:
- Simplified Query Example, focusing on the failing feature
ALTER TABLE wxp_dm.xqgl_req_report
ADD UNIQUE INDEX index2(report_name ASC) USING BTREE COMMENT '唯一索引';
```
Software Information:
- JSqlParser version
- Database (e. g. Oracle, MS SQL Server, H2, PostgreSQL, IBM DB2 )
Tips:
Please write in English and avoid Screenshots (as we can't copy and paste content from it).
Try your example online with the latest JSQLParser and share the link in the error report.
Do provide Links or References to the specific Grammar and Syntax you are trying to use.
Always check against the Latest SNAPSHOT of JSQLParser and the Syntax Diagram
Failing SQL Feature:
Caused by: net.sf.jsqlparser.JSQLParserException: net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "ASC" "ASC"
at line 2, column 43.
Was expecting one of:
Caused by: java.util.concurrent.ExecutionException: net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "ASC" "ASC"
at line 2, column 43.
Was expecting one of:
Caused by: net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "ASC" "ASC"
at line 2, column 43.
Was expecting one of:
SQL Example:
ALTER TABLE
wxp_dm.xqgl_req_reportADD UNIQUE INDEX
index2(report_nameASC) USING BTREE COMMENT '唯一索引';```
Software Information:
Tips:
Please write in English and avoid Screenshots (as we can't copy and paste content from it).
Try your example online with the latest JSQLParser and share the link in the error report.
Do provide Links or References to the specific Grammar and Syntax you are trying to use.