PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Leigh Moncher <dvor at voicenet dot com>
Subject: Re: return only a subset of a result
Date: May 21 1998 11:13PM

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

i.e.
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. So
are there
>other smarter ways to do it?
>
>Thanks :)
>Alb
>---------------------------------------------------------------------------
>|   ANGIS- The Australian National Genomic Information Service |
>|    http://www.angis.su.oz.au      email: albert@angis.su.oz.au   |
>|    Phone: 61-2-9351 7219          FAX: 61-2-9351 5694              |
>---------------------------------------------------------------------------
>