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 22 1998 1:55AM

Okay okay...  And yes it is an interesting problem....  Didn't quite
catch the idea of the program there...  Is your issue post evaluate 
(i.e.working the result set) or with the actual turnaround of returning
the rows?
 
At 09:45 AM 5/22/98 +1000, Albert Ng wrote:
>Exactly! Thank You Tim :) My SQL can be as refine as possible but
>that's not the point. The point is for ANY SQL result, I don't wanna
>so everything to the user in one go, 'cuz that could take forever to do.
>So I was trying to PAGE the results into pages of 10 or 20 or "N".
>Now if I process everything it'll miss the point of paging it. So ........
>what do you think?
>
>Thanks :)
>Alb
>ps. I hope this is an interesting problem that others have a solution to
>'cuz Sybase support doesn't. =(
>---------------------------------------------------------------------------
>|   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              |
>---------------------------------------------------------------------------
>
>On Friday, May 22, 1998 9:22 AM, Tim Holt [SMTP:holt@roguewave.com] wrote:
>> 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              |
>> >-----------------------------------------------------------------------
>> ----
>> > 
>