Re: Setting maximum rows to be selected

From: Neil Negandhi <negandhi_at_io.org>
Date: 18 Aug 1994 20:31:35 -0400
Message-ID: <330uh7$t4b_at_ionews.io.org>


I think I've solved the problem using PowerBuilder's features. I retrieve all the sorted information and then use a filter consisting of the rownum statement. While this isn't optimal (~350 records must be retrieved to get the top 20) it does seem to work.

A big thank you to all those who responded via news or mail

Neil Negandhi
negandhi_at_io.org


In article <dischner-1608941106150001_at_gkc12a.klch.med.uni-muenchen.de>, Anton Dischner <dischner_at_med.uni-meunchen.de> wrote:
>In article <32h6ip$1rn_at_ionews.io.org>, negandhi_at_io.org (Neil Negandhi) wrote:
>
>add the
>
>... where rownum <= 20;
>
>clause in your statement
>
>Best regards,
>
>Toni
>
>> I'm running PowerBuilder Enterprise with an Oracle 7.0 back end. What I
>> want to know is if it's possible to limit the number of rows a select
>> statement returns. For example, a fairly complex select returns order
>> information based on several tables, a sub-select, and use of the
>> group by statement. Out of the 100 or so rows returned, I would like to
>> display the top 20 orders based on the revenue field (which is derived
>> from a group sum expression).
>>
>> Neil Negandhi
>> negandhi_at_io.org
>
>
>+--------------------------------------------------------------------+
>| Anton Dischner, DBA and system-programmer Phone: +49 89 70953202|
>| Institut fuer Klinische Chemie Fax : +49 89 70958888|
>| Klinikum Grosshadern Home : +49 89 6254060 |
>| Ludwig Maximilians Universitaet Muenchen Handy: +49 172 8388880|
>| 81366 Muenchen |
>| Marchioninistr. 15 |
>| Germany Mail: dischner_at_med.uni-muenchen.de|
>+--------------------------------------------------------------------+
Received on Fri Aug 19 1994 - 02:31:35 CEST

Original text of this message