Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> recursive query

recursive query

From: Jürg Schaufelberger <juerg.schaufelberger_at_tele2.ch>
Date: Thu, 20 Jul 2006 20:06:22 +0200
Message-ID: <1BPvg.249$zi6.25@nntpserver.swip.net>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US