-
Equivalent of Hierarchy SQL in Oracle
Hi All,
We have some performance issues with 'CONNECT BY PRIOR' SQL statement and trying to find an alternate SQL which gives the same output.
Example:
ENum-----------------Mgr
Julie
Andrew---------------Julie
Mark-----------------Andrew
Matt-----------------Andrew
Wyatt----------------Julie
Jenny----------------Wyatt
SELECT enum, mgr FROM START WITH enum IS NULL
CONNECT BY PRIOR enum = mgr;
Output:
-------
Julie
---Andrew
------Mark
------Matt
---Wyatt
------Jenny
---Joel
How do I get the same output without using CONNECT BY PRIOR command. I dont mind creating a new table that will keep all the possible combinations between enum and mgr columns.
Please provide your solution. I really appreciate it.
Thanks in advance,
Rao
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Click Here to Expand Forum to Full Width
|
|