循环两个日期的要执行的存储过程或代码

declare
i int :=0;
p_dt_begin date;
V_LDT_DATE date;
begin
while i<70 loop
dbms_output.put_line('变量'||i);
p_dt_begin:=to_date(to_char(sysdate-(i+1),'yyyy-mm-dd')||' 07:00:00','yyyy-mm-dd hh24:mi:ss' );
V_LDT_DATE:=to_date(to_char(sysdate-i,'yyyy-mm-dd')||' 07:00:00','yyyy-mm-dd hh24:mi:ss' );
P_ZYGL_SFCRJHZ_RQ(p_dt_begin, V_LDT_DATE,'410882101000000001');
i:=i+1;
end loop;

exception
when others then
dbms_output.put_line('变量'||i);
end ;

原文地址:https://www.cnblogs.com/doudou618/p/6478953.html