It seems that PL/SQL developper is missing some of the new keywords introduced with 10g:
NOCYCLE
CONNECT_BY_ROOT
CONNECT_BY_ISCYCLE
For more information about Hierarchical Queries see Hierarchical Queries (10g) .
Also the last AND condition does have an odd position.
NOCYCLE
CONNECT_BY_ROOT
CONNECT_BY_ISCYCLE
For more information about Hierarchical Queries see Hierarchical Queries (10g) .
Also the last AND condition does have an odd position.
Code:
SELECT last_name "Employee"
,connect_by_iscycle "Cycle"
,connect_by_root
,LEVEL
,sys_connect_by_path(last_name
,'/') "Path"
FROM employees
WHERE LEVEL <= 3
AND department_id = 80
START WITH last_name = 'King'
CONNECT BY nocycle PRIOR employee_id = manager_id
AND LEVEL <= 4;