From: Thomas Kyte <tkyte@us.oracle.com>
Newsgroups: comp.databases.oracle.misc
Subject: Re: Connect By Challenge!
Date: 8 Aug 2001 16:45:10 -0700
Organization: Oracle
Lines: 43
Message-ID: <9ksiu602jia@drn.newsguy.com>
References: <966fcac1.0108081223.39098cc@posting.google.com>
NNTP-Posting-Host: p-793.newsdawg.com
X-Newsreader: Direct Read News v2.80


In article <966fcac1.0108081223.39098cc@posting.google.com>, akm111@yahoo.com
says...
>
>I'd love some help with this.
>
>Let's say I've got a family tree type of database with:
>
>     person, parent, older_sibling
>
>as columns, and I want to output this data in a tree structure.  By
>using:
>
>     SELECT person, parent, older_sibling
>     FROM table_name
>     START WITH parent = 'Eve'
>     CONNECT BY parent = PRIOR person
>
>I get a tree structure, but the siblings aren't in any particular
>order.  I've read that Oracle 9 now has an ORDER SIBLINGS BY option,
>but for now I'm stuck with Oracle 8.
>
>Can anyone steer me in the right direction to get the siblings in
>order?
>
>Thanks a million,
>Amy

yes, 9i has the order siblings by that will solve this once and for all.

Until then, if you have total control over the indexing scheme -- a concatenated
index on (parent,older_sibling) -- without any other index with parent on the
leading edge -- will probably do it (by accident)

see

http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:9212348049

--
Thomas Kyte (tkyte@us.oracle.com)             http://asktom.oracle.com/ 
Expert one on one Oracle, programming techniques and solutions for Oracle.
http://www.amazon.com/exec/obidos/ASIN/1861004826/  
Opinions are mine and do not necessarily reflect those of Oracle Corp 


