Michael Peppler
Sybase Consulting
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
Sybase on Linux FAQ
Sybperl FAQ
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Tim Holt <holt at roguewave dot com>
Subject: RE: return only a subset of a result
Date: May 21 1998 11:21PM

But what if you were trying to do a search that showed "results n to
n+10 of x"? It's not a matter of reducing to a smaller subset for the
point of data, but rather for the point of a user?

Tim Holt, Webmaster
Rogue Wave Software

-----Original Message-----
From: Leigh Moncher []
Sent: Thursday, May 21, 1998 4:14 PM
To: SybPerl Discussion List
Subject: Re: return only a subset of a result

improve your select statement with a where clause to only return the
you want to work on.

select * from empper where emp_id > 20 and emp_id < 30 and marital_stat
'M' and age > 30 order by age;
At 08:57 AM 5/22/98 +1000, Albert Ng wrote:
>Hi All,
>   I am just wondering is there a way to do the following:
>1. do a select statement with order by - which might result in a few
thousand rows
>2. but instead of returning all rows, I just want to return, say rows
20-30 of the result
>    set.
>I know I can make a loop to go through the result set but that's slow.
are there
>other smarter ways to do it?
>Thanks :)
>|   ANGIS- The Australian National Genomic Information Service |
>|      email:   |
>|    Phone: 61-2-9351 7219          FAX: 61-2-9351 5694              |