--循环插入时间(当前时间截止到2020-12-31)
declare
temp int := 10000;
begin
for i in 1..temp
loop
if(to_date(to_char(sysdate+i,'yyyy-mm-dd'),'yyyy-mm-dd') = to_date('2021-01-01','yyyy-mm-dd')) then
exit;
end if;
insert into dailyestbufferqty(deliverydate,papertypeno,estimationqty,bufferqty,publicationcode) values(sysdate+i,'RS',0,0,'SCMP');
end loop;
commit;
end;
declare
temp int := 10000;
begin
for i in 1..temp
loop
if(to_date(to_char(sysdate+i,'yyyy-mm-dd'),'yyyy-mm-dd') = to_date('2021-01-01','yyyy-mm-dd')) then
exit;
end if;
insert into dailyestbufferqty(deliverydate,papertypeno,estimationqty,bufferqty,publicationcode) values(sysdate+i,'RS',0,0,'SCMP');
end loop;
commit;
end;