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: Limiting Returned Rows In Select Statement

Re: Limiting Returned Rows In Select Statement

From: Roger Snowden <rsnowden_at_supergeek.com>
Date: 1998/03/16
Message-ID: <01bd511d$1f271b80$096fc589@WS1009.labinterlink.com>#1/1

You have to bake in a view that has the order-by logic, then limit with the stopkey in the outer select statement. The disadvantage is that all rows still have to be fetched, but at least you can avoid pumping them through the net back to the client.

Roger Snowden

Robert Blizard <rblizard_at_cmcsys.com> wrote in article <34fa9ae2.1497082_at_news.ma.ultranet.com>...
> I haven't tried this at all, but would
> using a 'HAVING' clause do the trick?
>
>
> On Fri, 27 Feb 1998 11:06:29 -0500,
> "Randy Baker" <rsbakerZ_at_msn.com> wrote:
>
> >Oops! The approach below doesn't work with ORDER BY because it cannot be
> >included within the subquery.
> >
> >Any other thoughts on how one can accomplish the effect of adding WHERE
> >ROWNUM < n except that the rows are limited *after* ordering occurs?
> >
> >Thanks,
>
>
Received on Mon Mar 16 1998 - 00:00:00 CST

Original text of this message

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