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

Home -> Community -> Usenet -> c.d.o.tools -> Re: Tree question

Re: Tree question

From: Robert Moldenhauer <persia_at_persia.com>
Date: Fri, 26 Jan 2001 01:23:36 +1100
Message-ID: <3A7036E6.146C7D41@persia.com>

> G'Day,
>
> I have a tree structure implimented in Oracle. Any parent may have any
> number of children including none. The structure of the table is
> basically a name for the current node and a link to the child of that
> node. For example, the tree
>
> A
> B C
> D
>
> is represented as
>
> A B
> A C
> B D
> C NUL
> D NUL
>
> Now the problem is that some of the children are pseudo children, put
> there to make the structure more readable. There can be any number of
> psuedo choldren in the tree.
>
> What I would like to do is provide a table or view or query that removes
> the pseudo children and puts the children on the next available parent.
> For example lets say that B in the above example is a pseudo child. I
> want to produce the following result
>
> A C
> A D
> C NUL
> D NUL
>
> It seems that I would need to do connect by, but I just don;t see it.
> Anyone have an idea how to solve it?
>
> Thanks and Merry Christmas
  Received on Thu Jan 25 2001 - 08:23:36 CST

Original text of this message

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