Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Top N in Oracle 8.0.5

Re: Top N in Oracle 8.0.5

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Mon, 01 Jul 2002 22:17:10 +0200
Message-ID: <j5e1iu0m4lhja02v295t4bk3gksqvh0f7m@4ax.com>


On Mon, 1 Jul 2002 13:20:19 -0400, "ivan vasquez" <ivan_at_itos.uga.edu> wrote:

>Hi,
>
>How do I create a top-N query in Oracle 8.0.5?
>
>The top-N has to happen after sorting the input, but ordered subqueries
>weren't allowed prior to 8i. All the documentation I've found is related to
>8i, still no luck with this version!
>
>INSERT INTO PA_ASSIGN
>SELECT * FROM (
> SELECT *
> FROM PA_SELECT
> WHERE code = xPlSqlVariable1
> ORDER BY col1, col2, col3
>WHERE ROWNUM <= xPlSqlVariable2;
>
>Any hints are greatly appreciated.
>
>Thanks,
>Ivan.
>

Upgrade to something supported

Regards

Sybrand Bakker, Senior Oracle DBA

To reply remove -verwijderdit from my e-mail address Received on Mon Jul 01 2002 - 15:17:10 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US