This link has been bookmarked by 61 people . It was first bookmarked on 14 Nov 2007, by someone privately.
-
26 Apr 13
Jeremy Heier"CREATE PROCEDURE [dbo].[usp_PageResults_NAI]
(
@startRowIndex int,
@maximumRows int
)
AS
DECLARE @first_id int, @startRow int
-- A check can be added to make sure @startRowIndex isn't > count(1)
-- from employees before doing any actual work unless it is guaranteed
-- the caller won't do that
-- Get the first employeeID for our page of records
SET ROWCOUNT @startRowIndex
SELECT @first_id = employeeID FROM employees ORDER BY employeeid
-- Now, set the row count to MaximumRows and get
-- all records >= @first_id
SET ROWCOUNT @maximumRows
SELECT e.*, d.name as DepartmentName
FROM employees e
INNER JOIN Departments D ON
e.DepartmentID = d.DepartmentID
WHERE employeeid >= @first_id
ORDER BY e.EmployeeID
SET ROWCOUNT 0
GO" -
13 Dec 11
-
27 Sep 11
-
30 Apr 11
-
31 Jan 10
-
07 Jan 10
-
21 Dec 09
-
12 Oct 09
-
27 Sep 09
-
16 Sep 09
Joe JenkinsThe improvements using the the stored procedure are immense when paging data.
-
03 Jun 09
-
11 Jun 08
-
25 Nov 07
-
19 Nov 07
-
16 Nov 07
-
15 Nov 07
Slobodan PavkovA More Efficient Method for Paging Through Large Result Sets
asp.net c# sqlserver sqlserver2000 sqlserver2005 paging performance sql db database .net importedfromdelicious
-
14 Nov 07
-
07 Nov 07
-
----- ----
-
-
12 Sep 07
-
13 Jul 07
-
15 Mar 07
Daniel MachadoMétodo eficiente para paginação em consultas no SQL Server 2000
paging sql sqlserver2000 database tips development programming sqlserver
-
10 Jan 07
-
06 Dec 06
-
30 Oct 06
-
19 Oct 06
-
22 Sep 06
-
16 Sep 06
-
14 Sep 06
-
12 May 06
-
07 May 06
-
02 May 06
-
28 Apr 06
-
26 Apr 06
-
08 Dec 05
Would you like to comment?
Join Diigo for a free account, or sign in if you are already a member.