Alternatives
Members may post updates or alternatives to this current article in order to show different
approaches or add new features.
16 Jan 2012Robby Tendean 3 alternatives
How to create an efficient paging using SQL script
Take a look at this:DECLARE @ActualRow = 1; /*Start in first item*/DECLARE @ItensCount = 100; /*100 itens for page*/DECLARE @Page = 1; /*Start in first page*/SELECT * FROM(SELECT *, ROWNUMBER() OVER(ORDER BY Name) as ROWNUM FROM Users) as UsWHERE ROWNUM BETWEEN...
Hi, what about such solution?DECLARE @pageNumber INTDECLARE @rowsOnPage INTSET @rowsOnPage=5SET @pageNumber=2DECLARE @totalItemsToSelect INTSET @totalItemsToSelect=@rowsOnPage * @pageNumberSELECT TOP (@rowsOnPage) * FROM MainTrans WHERE ID IN( SELECT TOP...
I am a professional Software Developer. I have experience in developing Windows Applications, e-commerce Portals, Content Management Systems and Data driven websites.
My technical forte includes: C#, ASP.NET, ADO.NET, JavaScript, jQuery, SQL Server, Design Patterns.
My interests involves programming, website development, developing applications for Android and learning subjects related to Software Engineering/Information Systems. Currently I am working as a Software Engineer at PowerObjects Pvt Ltd.