Click here to monitor SSC
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
FORUM

Display Supplier (Help)

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

FORUM

Sql report - inactive suppliers

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

FORUM

Query to find cheapest supplier when multiple suppliers?

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

FORUM

Filter suppliers that dindn't sell

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

FORUM

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...

 
Contribute