Skip to content

Can't parse with query inner join #1302

Closed
@longht95

Description

@longht95

I have statement :
SELECT * FROM TABLE1 tb1
INNER JOIN TABLE2 tb2
INNER JOIN TABLE3 tb3
INNER JOIN TABLE4 tb4
ON (tb3.aaa = tb4.aaa)
ON (tb2.aaa = tb3.aaa)
ON (tb1.aaa = tb2.aaa)

I try :
Select select = (Select) CCJSqlParserUtil.parse("SELECT * FROM TABLE1 tb1 "
+ "INNER JOIN TABLE2 tb2 "
+ "INNER JOIN TABLE3 tb3 "
+ "INNER JOIN TABLE4 tb4 "
+ "ON (tb3.aaa = tb4.aaa) "
+ "ON (tb2.aaa = tb3.aaa) "
+ "ON (tb1.aaa = tb2.aaa)");

Expected behavior
Exception in thread "main" net.sf.jsqlparser.JSQLParserException: Encountered unexpected token: "ON" "ON"
at line 1, column 115.
System

  • Database you are using : Oracle
  • Java Version : 1.8
  • JSqlParser version : 4.1

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions