日期:2014-05-18 浏览次数:20550 次
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
------解决方案--------------------
还能想到的就是去拼接动态执行的SQL字符串。