Use the following example.
select (@maxno/50000) + 1 SheetsCount
while @maxno >= 0
begin
select @TempSno = isnull(@TempSno,0) + 1
select * from yourtable where Slno between (50000 * (isnull(@TempSno,0)-1))+1 and 50000 * @TempSno order by Slno
select @maxno =@maxno - 50000