create or replace procedure pro_inser(a in number,com in number,date1 in varchar2,date2 in varchar2)
is
begin
insert into aj_ap values(a,com,to_date('date1','yyyy-mm-dd'),to_date('date2','yyyy-mm-dd'));
end;
declare
a number:=100001;
com number;
date1 varchar2(10);
date2 varchar2(10);
begin
while a<=100015 loop
exec pro_inser(a,&com,&date1,&date2);
a:=a+1;
end loop;
end;