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: Oracle SELECT statement for SPECIFIC row?

Re: Oracle SELECT statement for SPECIFIC row?

From: Randy DeWoolfson <randy_at_euclidsys.com>
Date: Wed, 15 Mar 2000 09:50:22 -0500
Message-ID: <38CFA32E.7AB67294@euclidsys.com>


not really enough info i think...

can the row number change over time?
do you need to process all rows, just one at a time? does the magic row number link off to anywhere else? is a rowid ok?

randy

jmckwood_at_my-deja.com wrote:

> Due to architectural limitations of the application, I need to be able
> to select individual rows in a database table, based on their "row
> number," preferably using the SELECT statement. How do I do this?
>
> For example, if database table ACCOUNTS has 250 rows, e.g.
> select count(*) from ACCOUNTS == 250
>
> I need to be able to do the following:
> for index = (1..250)
> select * from ACCOUNTS where ROWNUM = index
>
> However, when I try this, the select statement works ONLY when
> rownum == 1. If I try rownum == 5 or any other value, I get nothing
> back.
>
> Is there a way to retrieve SPECIFIC rows, by row number, without
> knowing the contents of each row?
>
> Thanks for helping ...
> Jim Wood
> jmwood_at_unispheresolutions.com
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Wed Mar 15 2000 - 08:50:22 CST

Original text of this message

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