Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: SQL - SELECT x rows...
In article <F4155D9F9AA4D111B9990020AFBA52D53E7D56_at_class06.ip061.sfisoftware.
com>,
"Mark G" <markag_at_wonderstats.com> wrote:
> SELECT column_list ROWNUM FROM
> (SELECT column_list FROM table
> ORDER BY Top-N_column)
> WHERE ROWNUM <= N
Does this work? We have Oracle 8 and the documentation says (and experimentation supports) that you cannot have an ORDER BY clause on a subquery (which is what from FROM part is).
Does this require some sort of add-on? I went to oracle.com and tried to search on Top-N but all I got were javascript error messages. I notified Oracle of the problem, BTW.
-- Jim Lyons | Network Systems Analyst Entertech - The IC2 Institute | 512-482-0273, ext. 269 University of Texas at Austin | jlyons_at_weblyons.com http://www.weblyons.com Sent via Deja.com http://www.deja.com/ Before you buy.Received on Thu Aug 10 2000 - 00:00:00 CDT