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

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

      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