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: 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
http://www.roguewave.com


-----Original Message-----
From: Leigh Moncher [mailto:dvor@voicenet.com]
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
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              |
>-----------------------------------------------------------------------
----
>