This content has been marked as final. Show 4 replies
Welcome to the forum!
Here's one way:
Notice that there is no START WITH clause.
SELECT CONNECT_BY_ROOT son AS son , dad AS ancestor FROM t WHERE CONNECT_BY_ISLEAF = 1 CONNECT BY son = PRIOR dad ;
Thanks for posting the CREATE TABLE and INSERT statements; that's very helpful!
Always say which version of Oracle you're using. This is always important, but especially so with hierarchical queries, because every version since Oracle 7 has had major improvements in this area.