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 -> hierarchical query problem

hierarchical query problem

From: Cris Carampa <cris119_at_operamail.com>
Date: Wed, 02 Mar 2005 16:32:09 +0100
Message-ID: <4225dc8f$0$6300$5fc30a8@news.tiscali.it>


I have a hierarchical query that returns the following output:

id                             date

------------------------------ --------
18331 25-01-05
---13204 28-10-04
------13193 07-10-04
---13205 28-10-04
------13194 07-10-04
---13206 28-10-04
18332 25-01-05
---13204 28-10-04
------13193 07-10-04
---13205 28-10-04
------13194 07-10-04
---13206 28-10-04
19521 15-02-05
---14798 25-11-04
---15228 02-12-04
------15223 08-11-04

Please notice that ID is formatted in order to show its hierarchical level.

I wish to wrote another query that uses this query as an inline view and returns an output like this:

root days
----- ----

18331 xxx
18332 yyy
19521 zzz

Where 18331, 18332 and 19521 are the root nodes and "days" are the days   between the date of the root node and the average date of the leaf nodes.

Any suggestion?

Thank you. Kind regards,

-- 
Cris Carampa (cris119_at_operamail.com)

- We're gonna be like three little Fonzies here. And what's Fonzie like?
- Cool?
Received on Wed Mar 02 2005 - 09:32:09 CST

Original text of this message

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