oracle循环执行存储过程
create or replace procedure sp_loop_run is
Cursor datekeey is
select to_number(to_char(datekeey,'yyyyMMdd')) datekeey
from (select
date'2021-01-01' + (rownum - 1) datekeey
from dual connect by rownum <= (date'2021-06-30' - date'2021-01-01' + 1))
order by datekeey; --从xx到xx遍历日期
i number;
begin
for i in datekeey LOOP
begin
sp_pub_fund_quo_adj(i.datekeey); --调用存储过程
end;
end LOOP;
commit;
end sp_loop_run;