hierarchy [message #314021] |
Tue, 15 April 2008 10:00  |
hany_marawan
Messages: 198 Registered: April 2005 Location: Cairo - Egypt
|
Senior Member |
|
|
Hello
I know that's oracle can build a hierarchy from above to bottom by "connect by prior" statement.
But can I build this hierarchy to give me the the data from bottom to above.
i.e if I have an employee with number 4 and has a manager with number 3 so
If I have the employee 4 how can I get his manager
Thanks
|
|
|
|
Re: hierarchy [message #314151 is a reply to message #314023] |
Tue, 15 April 2008 22:01  |
rleishman
Messages: 3728 Registered: October 2005 Location: Melbourne, Australia
|
Senior Member |
|
|
Rather than
CONNECT BY PRIOR emp_num = manager
START WITH manager IS NULL
use
CONNECT BY emp_num = PRIOR manager
START WITH emp_num = 3
Ross Leishman
|
|
|