It's a usual task get some records from a big table. MySql has a simple operator Limit offset,pagesize
If you want to get 16-20 records from the table Customers you write in MySql
SELECT * FROM Cbstomers LIMIT 15,5
It's a not trivial task for MS SQL query. We should write the next query :
SELECT * FROM (SELECT TOP 5 CustomerID,FullName From (SELECT TOP 20 Customers.CustomerID, Customers.FullName
FROM Customers
ORDER BY Customers.CustomerID ASC) As T2 Order by CustomerID DESC) ORDER BY CustomerID ASC;
page size=5
current page=4
current page x page size=20
Tuesday, January 31, 2012
Subscribe to:
Posts (Atom)
Labels
- accounting (1)
- accounting software (1)
- adjusting (1)
- ASP.Net 2.0 (2)
- barcode scanner (1)
- Blog (1)
- classical music (1)
- clothing software (1)
- Excel (1)
- fashion clothes (1)
- free invoice template (1)
- GAE (1)
- Horowitz (1)
- HTML (1)
- HTTPS (1)
- import Excel file (1)
- inventory (2)
- inventory software (1)
- inventory system (6)
- inventory system web based software ASP.Net (1)
- invoice (1)
- meta tag (1)
- mobile wireless inventory software (3)
- MS SQL (1)
- multi location (1)
- music pianist (1)
- music software (1)
- online (1)
- osCommerce (1)
- pen and paper (1)
- physical counting (1)
- piano (1)
- point of sale (1)
- query (1)
- receipt (1)
- reorder point (1)
- software (1)
- system (1)
- warehouse (1)
- warehouse management (1)
- web store (1)
- XML (2)