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 -> How to Sort Subset of Hierarchical Query

How to Sort Subset of Hierarchical Query

From: Allen <allen_at_ms15.hinet.net>
Date: Fri, 1 Oct 1999 07:33:30 +0800
Message-ID: <7t0rvr$3vu@netnews.hinet.net>


Hi,

   Can anyone help me how to sort subset when using Oracle Hierarchical Query, For Example:

Table:

     Parent Child Child_Seq
Contains:

        aaa            bbb            300
        bbb            ccc            200
        bbb            ddd           100
        bbb            eee            240
        aaa            kkk            210
SQL Statement:

    select parent, child, child_seq from TABLE start with parent = 'aaa' connect by prior child=parent.
Output:

        aaa            bbb            300
        bbb            ccc            200
        bbb            ddd           100
        bbb            eee            240
        aaa            kkk            210

But I hope that I can get another result, if same parent, I need to sort by child_seq:

        aaa            bbb            300
        bbb            ddd           100
        bbb            ccc            200
        bbb            eee            240
        aaa            kkk            210









Received on Thu Sep 30 1999 - 18:33:30 CDT

Original text of this message

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