SQL Clone
SQLServerCentral is supported by Redgate
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...


Design Supplier data

hi All, I have a Supplier data : COMPARE: SERVER A : V, S...


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.no, fc.nome, 'FANO1' = SUM(Case When year(datalc)...