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

Home -> Community -> Usenet -> c.d.o.misc -> Re: SELECT CONNECT BY...

Re: SELECT CONNECT BY...

From: Matthias Gresz <GreMa_at_t-online.de>
Date: 1998/02/25
Message-ID: <6d0igc$755$5@news02.btx.dtag.de>#1/1

On 24 Feb 1998 10:26:34 GMT, "dicaprio" <dicaprio_at_tin.it> wrote:

Hi,

here's somthing form J.P.Higgins:

columns lev format a15
Select

        lpad(level,level*2) lev, region_name
from

        region
start with parent_region is null
connect by prior parent_region = region_id ;

where table region looks like:

region_id		CHAR(4)
REGION_NAME		VARCHAR2(40)
parent_region		CHAR(4)	

Hope this helps.

>Hi,
>
>Someone can help me with an example about :
>
> "You use LEVEL with the SELECT CONNECT BY statement to organize rows from
>a database table into a tree structure. LEVEL returns the level number of a
>node in a tree structure. The root is level 1, children of the root are
>level 2, grandchildren are level 3, and so on..."
>
>Thanks in advances
>Veramente Grato....
>
> Clemente di Caprio
>
>dicaprio_at_tin.it

--

Regards

Matthias Gresz    :-)

GreMa_at_T-online.de
Received on Wed Feb 25 1998 - 00:00:00 CST

Original text of this message

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