Home » SQL & PL/SQL » SQL & PL/SQL » sorting siblings in connect by in 8i
sorting siblings in connect by in 8i [message #22850] Fri, 01 November 2002 09:32 Go to next message
Bob
Messages: 49
Registered: March 1999
Member
Hi Gurus

need a quick response . . .

How should I sort the siblings(department description) in the following qry. I'm using 8.1.7.

select lpad(' ',10*(ll-1))||description as description
from
( select parent_skey, child_skey, dept_id, level as ll
from table a
start with parent_key = 15
connect by parent_key = prior child_key
)v, deptt
where deptt.dept_id = v.dept_id

Thanks in advance . . .
Re: sorting siblings in connect by in 8i [message #22852 is a reply to message #22850] Fri, 01 November 2002 09:38 Go to previous messageGo to next message
Todd Barry
Messages: 4819
Registered: August 2001
Senior Member
Unfortunately, you cannot do this in 8i. 9i has added a 'ORDER SIBLINGS BY <expression>' clause to handle this.
Re: sorting siblings in connect by in 8i [message #22857 is a reply to message #22850] Fri, 01 November 2002 09:56 Go to previous message
andrew again
Messages: 2577
Registered: March 2000
Senior Member
See if this helps:

Previous Topic: Re: Need Complex Query
Next Topic: variable substitution in stored procedure
Goto Forum:
  


Current Time: Sun Apr 28 19:12:49 CDT 2024