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 -> Tree question

Tree question

From: Robert Moldenhauer <persia_at_persia.com>
Date: Mon, 25 Dec 2000 10:12:43 +1100
Message-ID: <3A4682EA.7E398935@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 Sun Dec 24 2000 - 17:12:43 CST

Original text of this message

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