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: Help! SQL & recursion.

Re: Help! SQL & recursion.

From: Michael Krolewski <vandra_at_u.washington.edu>
Date: 1998/06/13
Message-ID: <35833C19.4B986367@u.washington.edu>#1/1

Try reading about the "connect by" clause in SQL.

Mike Krolewski

Vladimir Bogush wrote:

> Hi,
>
> Can anyone help with this little dilemma:
>
> FILE1 <->> FILE2 <->>FILE3 <->> ....
>
> FILE1 has reference ID uniq, autoincrement field, PREVID=0
> FILE2 has reference PREVID = ID from FILE1
> FILE3 has reference PREVID = ID from FILE2
> etc.
>
> In my case FILE1, FILE2,FILE3, etc are referred to the same physical
> datafile.
> Number of levels is not limited or many.
>
> 1. I would like to delete all childrens by specifying only ID of their
> parent node;
> 2. Copy subtree with ID to another subtree, don't forget that new ID must be
> autoincremented and UNIQ;
> 3. I would like to go through the whole tree from ID down;
> 4. Find the head/s for ID. Head means no parents. As explained before the
> relation File1 to File2 is 1 to many, but my case it is many to many, so ID
> record can have many head nodes.
>
> I would really appreciate any help.
>
> Thanks
> Evgeny
Received on Sat Jun 13 1998 - 00:00:00 CDT

Original text of this message

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