Re: How to tweak hierarchial SQL queries?

From: TillKahle <tillkahle_at_aol.com>
Date: 1995/12/01
Message-ID: <49mou4$il5_at_newsbf02.news.aol.com>#1/1


In articlel <NEWTNews.817690699.11000.bruce_at_ga.bst.bls.com>, Bruce Douglas <bruce.douglas_at_bridge.bst.bls.com> writes:

>As an Oracle newbie, I've recently discovered the START WITH... CONNECT
 BY
>clauses in SQL. It is really neat, but.....
>
>1. Is there any way to affect the order in which "siblings" are returned?
 For
>
>example, we have a parent-child table containing locations. I'd like to
 see
>this result from a query:
>
>Arizona
> Phoenix
> Tempe
>Arkansas
> Fayetteville
> Little Rock
> Texarkana
> ...
>
>I can't get the "states" and "cities" to come back in alphabetical order.

There is a pseudo-column LEVEL, so ORDER BY LEVEL,name!

T. Kahle, Hamburg Received on Fri Dec 01 1995 - 00:00:00 CET

Original text of this message