Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: SQL question
A copy of this was sent to "Carles Bayés Martín" <cbayes_at_comb.es>
(if that email address didn't require changing)
On Sat, 07 Aug 1999 21:27:20 +0200, you wrote:
>I'm a newby and I have some doubts about SQL.
>Does anybody know if it's possible to make a SELECT FROM another SELECT
>ordered by a column?
>What I mean is the following:
>
>SELECT * FROM (SELECT * FROM table ORDER BY points)
>WHERE .................
>
>I need to select rows from row number X to Y (ordered by "points"), so
>I'd need to SELECT from a previously ordered table (a recordset).
>I've read that the clause ORDER BY must go at the end of the query and
>it cannot be included in a subquery.
>
>
>Thank you.
That syntax is valid in Oracle8i, release 8.1 but not in 8.0 or before. So, you need 8.1 or up to permit that syntax.
--
See http://govt.us.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'...
Current article is "Part I of V, Autonomous Transactions" updated June 21'st
Thomas Kyte tkyte_at_us.oracle.com Oracle Service Industries Reston, VA USA
Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Sat Aug 07 1999 - 15:50:25 CDT