赋值错了:add_one := select substr(max(apply_no),1,2)||lpad(to_char(max(to_number(substr(apply_no,2,length(apply_no))))+1),3,'0') from COREMOUNT.FJ_LEAVE_APPLIES;
改为
select substr(max(apply_no),1,2)||lpad(to_char(max(to_number(substr(apply_no,2,length(apply_no))))+1),3,'0') into add_one from COREMOUNT.FJ_LEAVE_APPLIES;

解决方案 »

  1.   

    select substr(max(apply_no),1,2)||lpad(to_char(max(to_number(substr(apply_no,2,length(apply_no))))+1),3,'0') INTO add_one from COREMOUNT.FJ_LEAVE_APPLIES;注:用「INTO add_one」試試
      

  2.   

    还有个错误提示:
    1/24     PLS-00103: 出现符号 ")"在需要下列之一时:
             <an identifier>
             <a double-quoted delimited-identifier> current
    这是什么意思。只剩下这一个错误了
      

  3.   

    create or replace function max_apply_no( ) 
    -->
    create or replace function max_apply_no
    去掉括号试试