declare cur cursor for select p1,p2,p3,p4,p5,p6 from u_batsale_c_bak; open cur;declare @p1 datatype,@p2 datatype,@p3 datatype,@p4 datatype,@p5 datatype,@p6 datatype; fetch next from cur into @p1,@p2,@p3,@p4,@p5,@p6;while @@fetch_status=0 begin exec p_auto_store_bak @p1,@p2,@p3,@p4,@p5,@p6; fetch next from cur into @p1,@p2,@p3,@p4,@p5,@p6; endclose cur; deallocate cur;
declare cursor1 cursor for select col1,col2,col3,col4,col5,col6 from u_batsale_c_bak --order by ...
open cursor1 fetch next from cursor_now into @col1,@col2,@col3,@col4,@col5,@col6 while @@fetch_status = 0 begin exec p_auto_store_bak @col1,@col2,@col3,@col4,@col5,@col6 fetch next from cursor_now into @col1,@col2,@col3,@col4,@col5,@col6 end
select p1,p2,p3,p4,p5,p6 from u_batsale_c_bak;
open cur;declare @p1 datatype,@p2 datatype,@p3 datatype,@p4 datatype,@p5 datatype,@p6 datatype;
fetch next from cur into @p1,@p2,@p3,@p4,@p5,@p6;while @@fetch_status=0
begin
exec p_auto_store_bak @p1,@p2,@p3,@p4,@p5,@p6;
fetch next from cur into @p1,@p2,@p3,@p4,@p5,@p6;
endclose cur;
deallocate cur;
declare cursor1 cursor for
select col1,col2,col3,col4,col5,col6
from u_batsale_c_bak --order by ...
open cursor1
fetch next from cursor_now into @col1,@col2,@col3,@col4,@col5,@col6
while @@fetch_status = 0
begin
exec p_auto_store_bak @col1,@col2,@col3,@col4,@col5,@col6
fetch next from cursor_now into @col1,@col2,@col3,@col4,@col5,@col6
end
close cursor1
deallocate cursor1