Hierarchical Query without START WITH CONNECT BY
Kuldeep2Jun 27 2011 — edited Jun 27 2011Hi
I have data like below (Hierarchical)
ID Name ParentID Level
1 AAA 1 0
2 BBB 1 1
3 CCC 2 2
4 DDD 1 0
5 EEE 4 1
I want to find out Level 0 of each leaf level. for example
If i give input ID as 3, I should get its Level 0 as ID 1, For ID 5, level 0 is 4.
I dont want to use START WITH CONNECT BY as i need to test this query against some other database for performance.
Can we do it without using any Oracle advanced function just by using simple joins.