Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: ORDER BY issue with CONNECT BY query. Please help.
"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, RussiaReceived on Thu Jun 07 2001 - 05:56:20 CDT