如下:

create or replace procedure testdate_2 is
i number;
out1 varchar2(100);
out2 varchar2(100);
CUSTOMERID NUMBER;
cursor projidlist is select p.projid from proj_baseinfo p where p.projstage!='-999';
begin

for i in projidlist LOOP
begin
select p.customerid into CUSTOMERID from proj_baseinfo p where p.projid=i.projid;
--testdate_3(i.projid);
PRO_PROJ_REPORT_CRM_FINAN(i.projid,CUSTOMERID,out1,out2);
-- dbms_output.put_line(i.projidlist);
end;
end LOOP;
commit;
end testdate_2;

end;