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

Home -> Community -> Usenet -> c.d.o.tools -> Re: Retrieving only a part of a query - help!

Re: Retrieving only a part of a query - help!

From: Holger Kreft <Holger.Kreft_at_sutter.de>
Date: Thu, 19 Oct 2000 16:43:00 +0200
Message-ID: <39ef0882$1@news.ic-marl.de>

Hi Ralf,

the virtual column "rownum" may be helpful for your problem. Try something like this:

select *
from ( select rownum rn, t.* from table t ) where rn between 10 and 20;

But be aware, that Oracle will execute the complete (!) selection every time - from the first record to (at least) the last requested record.

regards

Holger Kreft

Ralf Brostedt <rb_at_brostedt.de> schrieb in im Newsbeitrag: 39EB3F18.64D8E986_at_brostedt.de...
> Hello,
>
> unlike MS Access, where I can specify a SQL Statement to retrieve only x
> records or x% of a query result, I desperately search for a similar
> SELECT statement in an Oracle (8i) database.
>
> The task: I have to connect to the Oracle database via ODBC/ADO from an
> ASP script, which should distribute the query result on more than one
> page. Even the OLE DB provider doesn't support the AbsolutePosition or
> AbsolutePage (and similar) properties with Oracle.
>
> I thought this would be a common task but I didn't find any infos about
> it in the Usenet or the W3.
>
> Any help will be appreciated. Please reply also per mail.
> TIA
>
> Ciao,
> Ralf "Arby" Brostedt
> --
> no sig today
Received on Thu Oct 19 2000 - 09:43:00 CDT

Original text of this message

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