Skip to content

Commit f1d2136

Browse files
committed
1 parent 0bb2358 commit f1d2136

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/main/jjtree/net/sf/jsqlparser/parser/JSqlParserCC.jjt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1552,9 +1552,11 @@ Expression RegularCondition():
15521552
| "!~" { result = new RegExpMatchOperator(RegExpMatchOperatorType.NOT_MATCH_CASESENSITIVE); }
15531553
| "!~*" { result = new RegExpMatchOperator(RegExpMatchOperatorType.NOT_MATCH_CASEINSENSITIVE); }
15541554
)
1555-
rightExpression=ComparisonItem()
15561555

15571556
[ <K_PRIOR> { oraclePrior = EqualsTo.ORACLE_PRIOR_END; } ]
1557+
1558+
rightExpression=ComparisonItem()
1559+
15581560
[ "(" "+" ")" { oracleJoin=EqualsTo.ORACLE_JOIN_LEFT; } ]
15591561

15601562
{

src/test/java/net/sf/jsqlparser/test/select/SelectTest.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1761,6 +1761,11 @@ public void testOracleHierarchicalQuery4() throws JSQLParserException {
17611761
String stmt = "SELECT last_name, employee_id, manager_id, LEVEL FROM employees CONNECT BY PRIOR employee_id = manager_id START WITH employee_id = 100 ORDER SIBLINGS BY last_name";
17621762
assertSqlCanBeParsedAndDeparsed(stmt);
17631763
}
1764+
1765+
public void testOracleHierarchicalQueryIssue196() throws JSQLParserException {
1766+
String stmt = "SELECT num1, num2, level FROM carol_tmp START WITH num2 = 1008 CONNECT BY num2 = PRIOR num1 ORDER BY level DESC";
1767+
assertSqlCanBeParsedAndDeparsed(stmt);
1768+
}
17641769

17651770
public void testPostgreSQLRegExpCaseSensitiveMatch() throws JSQLParserException {
17661771
String stmt = "SELECT a, b FROM foo WHERE a ~ '[help].*'";

0 commit comments

Comments
 (0)