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: Michael Peppler <mpeppler at peppler dot org>
Subject: RE: displaying limited number of rows
Date: Mar 22 2001 11:48PM

AGaneshalingam writes:
 > Tks for your reply. Sorry, I didn't describe my question correctly. I should
 > be able to display 50 rows at a given point. And continue this until I'm
 > done with displaying the all rows...


I was wondering if this was what you were looking for...

Well - the short answer is that you can't do what you want (or at
least not easily)

However, you can program things so that you can get the behaviour you
want, by doing something like this:

set rowcount 50
select ... from ... 

In the script, remember the last row, and now, when the user wants the
next page, you do:

select ... from ... where {somekey} > {last value}

and so on.

This works well, but you of course need to have a reasonable key on
which to base your where clause...


 > -----Original Message-----
 > From: Leung, Patrick []
 > Sent: Thursday, March 22, 2001 2:15 PM
 > To: 'AGaneshalingam'
 > Subject: RE: displaying limited number of rows
 > have you tried sending the command
 > set rowcount 50 
 > to your sql server?
 > -----Original Message-----
 > From: AGaneshalingam []
 > Sent: Thursday, March 22, 2001 5:04 PM
 > To: SybPerl Discussion List
 > Subject: displaying limited number of rows
 > I'm trying to display ( on the web) 50 rows from a table that has almost
 > 10,000 rows of data....Is this possible with CT-Lib using SybPerl. Please
 > help me.
 > Tks
 > Anton

Michael Peppler - Data Migrations Inc. - -
International Sybase User Group -
Sybase on Linux mailing list: