1 Reply Latest reply: Mar 11, 2013 6:41 AM by Tridus RSS

    CONNECT BY query doesn't return any results...

    701756
      Hi All

      I am trying to execute this CONNECT BY query...but it does not return any result.
      Could anyone please suggests what am I doing wrong. Or how should I modify the query to get the results.

      SELECT Distinct dt.DID FROM DEPT dt left outer join EMPLOYEE emp on dt.DID = emp.DID WHERE dt.parentid in (SELECT DEPT.DID FROM DEPT CONNECT BY PRIOR DEPT.DID = DEPT.PARENTID START WITH DEPT.PARENTID in (2000,-2000)) or dt.parentid=2000

      Any help would be really really appreciated.

      Thanks and Regards
      -Josef