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: Rownum

Re: Rownum

From: Michael Krolewski <vandra_at_u.washington.edu>
Date: Mon, 03 May 1999 22:57:40 -0700
Message-ID: <372E8C54.ADB26265@u.washington.edu>


You might want to explain more about the problem. Cursors are by defininition one of the most stable parts of Oracle.

As far as this problem goes, one could use a PL/SQL table. The first step is to clear the table and populate it with all the rows of the table.
You can then get at any point -- any set of rows, randomly or in sets via PL/SQL. It works well and is generally quite fast. To store the table permanently -- between connections, I believe this can be done by making the PL/SQL table part of a package.

Mike Krolewski

Sue French wrote:

> Can anyone help me with Rownum?
>
> For an intranet application, I need to fetch say 10 records. I can do this
> by specifiying "WHERE ROWNUM < 11".
>
> However, I then want to fetch either the next ten or the previous 10 rows.
> I thought I would be able to say "WHERE ROWNUM > 10 and ROWNUM < 20", but
> this returns no rows.
>
> I have to avoid using cursors, because this is causing no end of problems,
> so I really need to connect to the database, fetch the 10 records then
> disconnect and subsequently connect and disconnect when the next/previous 10
> are requested.
>
> Regards
>
> Sue French
> ______________________________________________________
> Visit me at http://homepages.tcp.co.uk/~sfrench/
> See you there!
Received on Tue May 04 1999 - 00:57:40 CDT

Original text of this message

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