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 -> Re: How i can do a recursive sql query

Re: How i can do a recursive sql query

From: Saar <sxmaxoz_at_us.oracle.com>
Date: Fri, 10 Jul 1998 14:21:28 -0700
Message-ID: <35A685D7.181D704C@us.oracle.com>


Ronald Berube wrote:

> I would like to know how i can do a recurvie sql.
> I have a table who contain the history (descendance) of famely (father, son)
> table description father char(20)
> sun char(20)
> in that table we have all the generation of a famely.
> Ex : Select * from table.
> Father Son
> John Luc 1e generation
> Luc Erik 2e generation
> Erik Ron 3e generation
> Ron Guy 4e generation
> Ben Roger 1e generation
> What i would like to do is to extract with one sql all the associate record,
> in same famely (ectract all record from John to Guy (4 record), if i give
> John for father, or only Ben if i gave Ben for father).
> Remenver i do not know the number of generation i will have in the table.
>
> Thank's for anay suggestion.
>
> Ronald
>

Look into the CONNECT BY clause in the SQL Reference manual.

--

 __  _    _  __    _ _   _   _ ___  ______________________________
((  /\\  /\\ ||)  |\V/| /\\ /\\ >/  Principal Performance Engineer
_))//-\\//-\\||\ |||||//-\\\\//<_ Oracle Corporation Digital SBU
////////////////// Drop x's in email (spam) //////////////////////



Received on Fri Jul 10 1998 - 16:21:28 CDT

Original text of this message

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