Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> recursive query
Hello ng
A table RECHTGRUNDSTUECK has the following structure:
FID number(10)
FID_BETROFFENESGRUNDSTUECK number(10)
(foreign key of the parent node)
FID_BERECHTIGTESGRUNDSTUECK number(10)
(foreign key of the child)
.
.
Why does the following query only list the first level of the tree ? I want to list the FID of the root-node and all the leaves. The nodes between the root and the leaves aren't interesting.
SELECT
RG0.FID_BETROFFENESGRUNDSTUECK, RG0.FID_BERECHTIGTESGRUNDSTUECK
FROM RECHTGRUNDSTUECK RG0
START WITH FID_BETROFFENESGRUNDSTUECK = 534
CONNECT BY PRIOR
FID_BERECHTIGTESGRUNDSTUECK = FID_BETROFFENESGRUNDSTUECK
Oracle Version 9.2
Thanks for any help
Jürg Received on Thu Jul 20 2006 - 13:06:22 CDT