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

Help! SQL & recursion.

From: Vladimir Bogush <vgb_at_cybergal.com>
Date: 1998/05/30
Message-ID: <6kprc5$cfc@enews2.newsguy.com>#1/1

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 May 30 1998 - 00:00:00 CDT

Original text of this message

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