Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Problem with SQL-Statement
Oracle's handbook is correct. Why not form the statement like...
select * from xyz where rownum < 10 order by ident_column;
This should give you the same result.
Evan
In article <3AF26E10.67CCD5B_at_WPM-Ingenieure.de>, Kast [WPM]
<Armin.Kast._at_WPM-Ingenieure.de> writes:
>Hi,
>
>I'm writing an Oracle client app on WIN2K using Oracle 8.0.5
>and have the following question:
>
>The SQL-Statement:
>
> select * from ( select * from xyz order by ident_column ) where rownum
>< 10;
>
>will not work. Why ????
>It causes an error that the right parenthesis is missing ( Error:
>ORA-00907 ) ???
>
>There is a note in the ORACLE Online Handbook Chapter SQL-Referenz
>4-502:
> "The ORDER BY clause cannot apper in subquerries within other
>statements"
>Is it really possible that subqueries can“t work with ORDER BY clause ?
>
>
>Any suggestion is appreciated.
>
>Regards,
>A.K.
>
>
![]() |
![]() |