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 -> Re: ORDER BY issue with CONNECT BY query. Please help.

Re: ORDER BY issue with CONNECT BY query. Please help.

From: Valery Yourinsky <vsu_at_bill.mts.ru>
Date: Thu, 07 Jun 2001 14:56:20 +0400
Message-ID: <3B1F5DD4.FB73CBE4@bill.mts.ru>

"Jürgen Kärner" wrote:
>
> I have a connect by query.
> I want to order items WITHIN EACH LEVEL by name.
>
> How can I do this?
>
> x)
> Simple example of results:
>
> SMITH
> TIGER
> SIMON
> TACKER
> FORRESTER
> KELLY
> JACKSON
> KING
>
> x)
> If I include ORDER BY in the end of the statement, I get this:
>
> FORRESTER
> JACKSON
> KELLY
> KING
> SIMON
> SMITH
> TACKER
> TIGER
>
> x)
> What I want, is to order items by name WITHIN EACH LEVEL.
> Like this:
>
> SMITH
> JACKSON
> KELLY
> KING
> SIMON
> FORRESTER
> TACKER
> TIGER
>
> How can I do that?

CREATE INDEX emp#i#mgr#ename

   ON emp(mgr, ename)
;

Valery Yourinsky

-- 
Oracle8 Certified DBA
Moscow, Russia
Received on Thu Jun 07 2001 - 05:56:20 CDT

Original text of this message

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