declare @lv_pageSize int, @lv_PageNumber int
set @lv_PageNumber=2
set @lv_pageSize =20
select * from
(
SELECT TOP 100 PERCENT
[primary].*,((row_number() OVER(ORDER BY emp_shiftid asc ) -1)/@lv_pageSize)+1 as pagenumber
FROM(
select *FROM Employee_Shifts
)[primary]
)[Primary] where pagenumber = @lv_PageNumber
set @lv_PageNumber=2
set @lv_pageSize =20
select * from
(
SELECT TOP 100 PERCENT
[primary].*,((row_number() OVER(ORDER BY emp_shiftid asc ) -1)/@lv_pageSize)+1 as pagenumber
FROM(
select *FROM Employee_Shifts
)[primary]
)[Primary] where pagenumber = @lv_PageNumber
No comments:
Post a Comment