Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
Log in  ::  Register  ::  Not logged in

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

Paging - Returning a Subset of a Recordset

By jeetesh,

Use this script to navigate your recordset a page at a time containing a specific number of records and in a specified order.

I use the supplier table of the northwind Database to demonstrate this

Return List of suppliers, ordered by supplier desc, 10 records at a time
execute prc_lov_SUPPLIERS "", "Suppliers", 1, 1 ''Page one
execute prc_lov_SUPPLIERS "", "Suppliers", 1, 2 ''Page two

Total article views: 236 | Views in the last 30 days: 1
Related Articles

Display Supplier (Help)

I need to display the Name of all US-based, Japan-based and German-based suppliers. Order the result...


Sql report - inactive suppliers

Hi all, I'm writing a report on inactive suppliers, just not sure how to approach it correctly. ...


Query to find cheapest supplier when multiple suppliers?

Hi I have the following table (created from a view): BaseSupplierID__SupplierID___ProductID__Pric...


Filter suppliers that dindn't sell

I have the following query: [code]SELECT, fc.nome, 'FANO1' = SUM(Case When year(datalc)...


SET value WHERE Product has > 2 Suppliers

Hi. I have been asked to SET a value in a table WHERE the Product has > 2 Suppliers. I have creat...


Join the most active online SQL Server Community

SQL knowledge, delivered daily, free:

Email address:  

You make SSC a better place

As a member of SQLServerCentral, you get free access to loads of fresh content: thousands of articles and SQL scripts, a library of free eBooks, a weekly database news roundup, a great Q & A platform… And it’s our huge, buzzing community of SQL Server Professionals that makes it such a success.

Join us!

Steve Jones

Already a member? Jump in:

Email address:   Password:   Remember me: Forgotten your password?
Steve Jones