Regarding Sys_Connect_By_Path
SELECT E.Empno,Sys_Connect_By_Path(E.Deptno,'\') path
FROM Scott.Emp E,Scott.Dept D
WHERE D.Deptno = E.Deptno
AND E.Empno = 7876
CONNECT BY PRIOR Empno = Mgr
START WITH Mgr IS NULL
Output of this query is
Empno Path
7876 \10\20\20\20
Requirement
I want that the path come in this way
\20\20\20\10
Reverse the above path
Please guide