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: Flattening a time-based tree structure

Re: Flattening a time-based tree structure

From: Rene Nyffenegger <rene.nyffenegger_at_gmx.ch>
Date: Mon, 8 Aug 2005 19:33:39 +0000 (UTC)
Message-ID: <dd8c2j$3er$1@klatschtante.init7.net>


On 2005-08-08, Catalin Pitis <cata.pitis_at_gmail.com> wrote:
> Hi all
>
> I have to develop a job for transforming a hierarchy of users of the
> form:
>
> USER
> --------------
> user_id
> parent_user_id
> valid_from
> valid_to
>
> (where valid_from valid_thru specifies the time interval the
> parent_user_id was the parent of user_id, but gives no warranty about
> the upper levels in the hierarchy)
>
> into a "flat" structure like this:
>
> USER_HIERARCHY
> ---------------
> user_id
> level_1_user_id
> level_2_user_id
> ...
> level_n_user_id
> valid_from
> valid_to
>
> There are about 10 millions records in the user TABLE and,
> unfortunately, I can't use CONNECT BY clause, because at some moment,
> the user U1 is the parent of user U2 and at another moment, the user U2
> is the parent of user U1.

What do you mean by 'at some moment,
the user U1 is the parent of user U2 and at another moment, the user U2 is the parent of user U1.'?

-- 
  Rene Nyffenegger
  http://www.adp-gmbh.ch/
Received on Mon Aug 08 2005 - 14:33:39 CDT

Original text of this message

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