User1979860870 posted
Hi
how to create Google like custom paging using Stored Procedure IN ASP.NET CORE . I have below Stored Procedure.
CREATE PROCEDURE PagedResults_New
(
@startRowIndex int,
@maximumRows int
)
AS
DECLARE @tmp TABLE
(
ID int ,
AccountNo char(30),
Amount decimal (18,2)
)
-- Insert the rows from tblItems into the temp. table
INSERT INTO @tmp (ID,AccountNo , Amount)
SELECT No,AccountNo,Amount
FROM tbl1
-- Now, return the set of paged records
SELECT e.*
FROM @tmp t INNER JOIN tbl1 e ON
e.No = t.ID
WHERE ID BETWEEN (@startRowIndex * @maximumRows) + 1 AND (@startRowIndex * @maximumRows) + @maximumRows
GO
Thanks