写错个字母:“bc_record bc_sursor%rowtype;”
改成:“bc_record bc_cursor%rowtype;”

解决方案 »

  1.   

    发现执行时报:‘警告: 创建的函数带有编译错误。’
    请再show error看看具体错误
      

  2.   

    FUNCTION SFCLIENT.F_BC_KYE 出现错误:LINE/COL ERROR
    -------- -----------------------------------------------------------------
    28/17    PLS-00103: 出现符号 "LSH"在需要下列之一时:
             := . ( @ % ;
             符号 ":=" 被替换为 "LSH" 后继续。28/38    PLS-00103: 出现符号 "THEN"在需要下列之一时:
             . ( * @ % & - + ; / at mod
             rem <an exponent (**)> and or ||36/6     PLS-00103: 出现符号 "END"
      

  3.   

    1.if 和end if;没成对 
    2.没有elseif ,有elsif
      

  4.   

    是这一段出错了  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;
      

  5.   

    elseif lsh=fh_record.posseq then 
    换成
    elsif lsh=fh_record.posseq then SQL没有elseif,我曾经遇到过这个问题;
    有些参考书上有错误(用elseif语句),容易给人造成误解!