Main Query
select *
from emp
where nvl(mgr,-1) = :p5_empno
Path Query
select '<a href="f?p=' || :app_id || ':5:' || :app_session ||
'::::p5_empno:-1">Top</a> >>> ' ||
substr(
sys_connect_by_path(
'<a href="f?p=' || :app_id || ':5:' || :app_session ||
'::::p5_empno:' || empno || '">' || ename ||
'</a>', ' : ' ), 4 ) path
from emp
where empno = :p5_empno
start with mgr is null
connect by prior empno = mgr
|