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:
Post Comments (Atom)
How to get logged in User's Security Roles using Java Script in dynamic CRM 365.
function GetloggedUser () { var roles = Xrm.Utility.getGlobalContext().userSettings.roles; if (roles === null) return false; ...
-
We can send SMS to any phone no and anywhere in the world using Twilio. what is Twilio? Twilio allows to make and receive phone calls an...
-
<title></title> <link href="css/table.css" rel="Stylesheet" type="text/css" /> // ...
-
function GetloggedUser () { var roles = Xrm.Utility.getGlobalContext().userSettings.roles; if (roles === null) return false; ...
No comments:
Post a Comment