代码如下:
CREATE OR REPLACE function     SFCLIENT.F_BC_KYE(sdate date,edate date) return boolean as 
isok boolean;
lsh number;
posid varchar2(15);
cursor fh_cursor(posid_id VARCHAR2,starttxndate date,etarttxndate date)  is
   select * from t_fh_rec where txndate>to_char(trunc(starttxndate),'yyyymmdd') and txndate<to_char(trunc(etarttxndate),'yyyymmdd') and posid=posid_id order by posid,posseq
cursor bc_cursor return  is
   select * from t_bcb;
fh_record fh_cursor%rowtype;
bc_record bc_sursor%rowtype;
begin
   open bc_cursor;
   dbms_output.put_line(to_char(bc_cursor%rowcount));   
   loop 
     fetch bc_cursor into bc_record;
     exit when bc_cursor%notfound;
     posid:=bc_record.posid;
     lsh:=bc_record.maxlsh;
     isok:=true; 
     FOR fh_record IN fh_cursor(bc_record.posid,sdate,edate) LOOP
         lsh:=lsh+1;
         if lsh<>fh_record.posseq then 
  if isok then                 
                     insert into t_bcqq values(fh_record.rowid,'noposid',lsh+1,lsh+1,'0',fh_record.posid,'0');
                     isok:=false;  
end if;           
         elseif lsh=fh_record.posseq then 
  if not isok then       
                     update t_bcqq set END_POSSEQ=lsh+1 where posid=fh_record.posid; 
                     isok:=true;  
end if; 
         else
             dbms_output.put_line('异常出错');             
         end if;
     end LOOP;            
   end loop; 
   commit;
   dbms_output.put_line('汇总完成');
   close bc_cursor;
   return true;
end;执行时报:‘警告: 创建的函数带有编译错误。’
望各位大虾帮忙看看