Skip to content

Commit

Permalink
Update query format
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhengguanLi committed Apr 22, 2024
1 parent 3bf1471 commit f6503dc
Showing 1 changed file with 11 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,17 @@ public void test_0() throws Exception {
}

public void testSelectWithJoin_UnderParen() {
String sql = "SELECT\n" +
"\tA.ID, B.NAME, C.TYPE\n" +
"\tFROM\n" +
"\ttbl_name1 A\n" +
"\tLEFT JOIN (tbl_name2 B)\n" +
"\tON A.ID = B.ID\n" +
"\tLEFT JOIN (tbl_name3 C)\n" +
"\tON A.ID = C.ID\n" +
"\tAND A.NAME = B.NAME";
String sql = "SELECT /* NUSQL.TEST */\n" +
" A.ID,\n" +
" B.NAME,\n" +
" C.TYPE\n" +
"FROM\n" +
" TBL_NAME1 A\n" +
" LEFT JOIN (TBL_NAME2 B)\n" +
" ON A.ID = B.ID\n" +
" LEFT JOIN (TBL_NAME3 C)\n" +
" ON A.ID = C.ID\n" +
" AND A.NAME = B.NAME";

OracleStatementParser parser = new OracleStatementParser(sql);
List<SQLStatement> statementList = parser.parseStatementList();
Expand Down

0 comments on commit f6503dc

Please sign in to comment.