Ordering Hierarchical Queries

From: Junmin Lin <linjm_at_guomai.sh.cn>
Date: 1998/03/25
Message-ID: <6favuq$8rq$1_at_www.clinux.ml.org>#1/1


Hi,

[Quoted] [Quoted] I have a question about hierarchical queries.

[Quoted] Suppose I have a table:

[Quoted] [Quoted] [Quoted] [Quoted] PARENT                          NOT NULL VARCHAR2(10)
 CHILD                           NOT NULL VARCHAR2(10)
 SORT_ORDER                               NUMBER(5)

I want to do a hierachical query, I could do:

select parent, child, sort_order, level
from relation
[Quoted] connect by parent = prior child start with parent = 'A' ;

But, if I want the out put sorted via sort_order and at the same time preseved the level.

How should I do it?

Thanks in advance.

Lin Junmin. Received on Wed Mar 25 1998 - 00:00:00 CET

Original text of this message