Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Order of selected rows.
Erika Grondzakova schrieb:
>
> Could I rely on that when I run several times the SELECT statement of
> the HIERARCHICAL query, I will receive the same order of the selected
> rows?
> Especially I'm interested in the same order of the rows on the same
> level.
>
> Example :
>
> SELECT lpad(' ',2*(LEVEL-1))||name
> FROM region
> START WITH name= 'IR1'
> CONNECT BY PRIOR name=parent;
>
Try :
select * from
( SELECT lpad(' ',2*(LEVEL-1))||name as my_logical_column FROM region
START WITH name= 'IR1' CONNECT BY PRIOR name=parent ) a
The result of the complete subquery is sorted in a second run.
Hpe that helps
Kai
Received on Wed Jan 27 1999 - 04:05:10 CST