DECLARE @PageNum AS INT;
DECLARE @PageSize AS INT;
SET @PageNum = 2;
SET @PageSize = 10;
WITH OrdersRN AS
(
SELECT ROW_NUMBER() OVER(ORDER BY OrderDate, OrderID) AS RowNum
,OrderID
,OrderDate
,CustomerID
,EmployeeID
FROM dbo.Orders
)
SELECT *
FROM OrdersRN
WHERE RowNum BETWEEN (@PageNum - 1) * @PageSize + 1
AND @PageNum * @PageSize
ORDER BY OrderDate
,OrderID;
Tuesday, 14 November 2017
Paging store Procedure to increase the performance data loading
Subscribe to:
Comments (Atom)
Secure and Unsecure configuration in Dynamics CRM 365.
Overview : In Dynamics CRM, when we create a plugin, we sometimes need to pass data to that plugin, instead of writing this data inside the ...
-
CREATE Procedure SP_PaymentToSupplierEmployee_Periodically @tbl_OrganizationId nvarchar(50) AS BEGIN SET NOCOUNT ON; SELECT COUNT(...
-
CRM does not allow direct download of the DLL file from the UI . However, there are several ways to retrieve the plugin DLL from the CRM e...
-
Overview : In Dynamics CRM, when we create a plugin, we sometimes need to pass data to that plugin, instead of writing this data inside the ...