Help with ordering hierarchial queries
From: <t_avinash_h1_at_hnlv4.verifone.com>
Date: 1995/04/05
Message-ID: <1995Apr6.103203.3257_at_sfov1.verifone.com>#1/1
I tried a recursive PL/SQL block but it was too slow. I have a recursive query, but the order seems to be topsy turvy. Can anyone help?
Date: 1995/04/05
Message-ID: <1995Apr6.103203.3257_at_sfov1.verifone.com>#1/1
Hello,
We are using oracle 7.0 and I want to know how I can do the following.
The table is as follows :
ID, NAME, VALUE, SEQINFO
The SEQINFO field to ensure the order of insertion and retrieval are the
same. It consists of integers and all selects are ordered by SEQINFO.
Name can be a normal name or a USES. If it is a USES then the VALUE
contains the ID which the USES points to . Now, I need the list to
be hierarchially generated WHILE PRESERVING THE ORDER IMPOSED BY SEQINFO.
So if the Data was
ID NAME VALUE SEQINFO 1 xx yy 1 1 zz pp 2 1 USES 2 3 1 aa bb 4 1 cc dd 5 2 ff dd 1 2 gg dd 2 2 USES 3 3 2 JJ JJ 4 3 PP PP 1 I should get : xx, zz, ff,gg,PP,JJ,aa,cc
I tried a recursive PL/SQL block but it was too slow. I have a recursive query, but the order seems to be topsy turvy. Can anyone help?
TIA,
Avinash.
Received on Wed Apr 05 1995 - 00:00:00 CEST