Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: transitive closure code and SQL wanted
In article <107e75b8.0205130541.decb964_at_posting.google.com>, "Steven
Tolkin" <steve.tolkin_at_fmr.com> wrote:
> Summary:
y.
>
> Details:
> My data is a tree of nodes.
> Suppose I have a table named node_parent that has two columns: node_id
> and parent_id. I want the code that will calculate a table named
> node_ancestor having the two columns: node_id and ancestor_id.
>
>
Just checking: You say the data is a tree, so I assume there is only one parent per node, except at the root. Is that correct, or can a node have more than one parent? You only need a separate table like node_parent if a node can have multiple parents. Received on Mon May 13 2002 - 15:45:37 CDT