You should use the LIMIT statement in the sql query I have done something like
this in PHP code , but the important thing is the sql query here :

$sql="select * from abstract LIMIT $end,$count";

the query selects $count rows starting from the row number $end: that's
if  $end=10, $count=100--> selects 100 records starting from row 10,

Good luck

"Liu, Leo Huaizhen" wrote:

> Stored_procedure gurus,
>
> I want to create stored_procedure in SQL Server with following parameters:
>
> start_num:
>    start point of recordset, i.e. start_num=40 means, only retrieve records
> from 40 in the record list
> end_num:
>    end point of recordset, i.e. end_num=60 means, only retrieve record to
> 60th.
> GPA:
>    search criteria, i.e. GPA > 4.0
>
> The query is something like this:
>
> SELECT * FROM tblStudents
> WHERE tblStudents.GPA > 4.0
>
> If the query returns 10,000 records, that is too much for JSP/Servlet to
> handle,
> however, if each time it only return records between start_num to end_num
> that will
> be good.
>
> Any solution, hint and sample code will be appreciated.
>
> Thanks,
>
> Leo
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to