Skip to content

Oracle hierarchical query with CONNECT_BY_ROOT #1269

@mikeshaw0917

Description

@mikeshaw0917

Describe the bug
I'm using JSQLParser on my project and having issues parsing connect_by_root query. Parser is failing.

To Reproduce
Steps to reproduce the behavior:

  1. " SELECT CONNECT_BY_ROOT last_name as name, salary FROM employees WHERE department_id = 110 CONNECT BY PRIOR employee_id = manager_id";

  2. Parsing this SQL using JSqlParser with this statements
    @test
    public void testOracleHierarchicalQuery1442() throws JSQLParserException {
    String sql = "SELECT CONNECT_BY_ROOT last_name as name, salary FROM employees WHERE department_id = 110 CONNECT BY PRIOR employee_id = manager_id";
    validateNoErrors(sql, 1, DatabaseType.ORACLE);
    }

  3. Exception

Expected behavior
A clear and concise description of what you expected to happen.

System

  • Oracle 11g
  • 8
  • JSqlParser version - 4.1

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