declare cur1 scroll cursor for select f1,f2 from table1 where f1 = @myF1
open cur1
select f1 = 0, f2 = 0 into #table1
fetch absolute 101 from cur1 into @f1, @f2
while (select @@fetch_status) = 0 and @n < 100
begin
insert #table1(f1, f2) values(@f1, @f2)
set @n = @n + 1
fetch next from cur1 into @f1, @f2
end
close cur1
deallocate cur1
delete #table1 where f1 = 0 and f2 = 0
select * from #table1
drop tabel #table1
go