简单的分页过程,确在第10,20,30....等页,不能显示,请求帮忙,谢谢
时间:2010-10-18 来源:tangself
if @RecordCount % @PageSize = 0 --计算总页数
set @PageCount = @RecordCount / @PageSize
else
set @PageCount = @RecordCount / @PageSize + 1
set @strSql1 = 'with TempTable as ( ' + @strSql1 + ' ) select * from TempTable where RowID between '
+ Convert(nvarchar(50),@StartIndex) + ' and ' + Convert(nvarchar(50),@StartIndex + @PageSize - 1)
exec(@strSql1)
end
相关阅读 更多 +