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

Home -> Community -> Usenet -> c.d.o.server -> Re: Need some help with ROWNUM

Re: Need some help with ROWNUM

From: Gad Krosner <krosner_at_excite.com>
Date: Mon, 05 Feb 2001 18:02:52 GMT
Message-ID: <95mps4$6jb$1@nnrp1.deja.com>

Thanks, Steve. I tried that route and it didn't work quite as expected.

For one thing, it didn't return exactly 25 rows. I got either 21 for rownum in the range 1001 and 1026, or 27 for rownum between 2001 and 2026.
It also seems to run twice as long because these queries run independently.

In article <t7to4v6mlocv5a_at_corp.supernews.co.uk>,   "Steve Blomeley" <steveblomeleyATyahoo.co.uk> wrote:
> Gad,
>
> How about ...
>
> SELECT * FROM
> (
> SELECT columns
> FROM tables
> WHERE join conditions, including outer join
> ORDER BY some columns
> )
> WHERE ROWNUM < 1026
> #
> MINUS
> #
> SELECT * FROM
> (
> SELECT columns
> FROM tables
> WHERE join conditions, including outer join
> ORDER BY some columns
> )
> WHERE ROWNUM < 1001
>
> hth
> Steve Blomeley
>
>

Sent via Deja.com
http://www.deja.com/ Received on Mon Feb 05 2001 - 12:02:52 CST

Original text of this message

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