select taskid into v_parentid 
      from OA.T_PROJECTTASK 
        where LTrim(RTrim(wbs)) = v_wbs and submiter = p_userid and state='0';这句没有结果集,在oracle里会报错.可以改为:
select max(taskid) into v_parentid 
      from OA.T_PROJECTTASK 
        where LTrim(RTrim(wbs)) = v_wbs and submiter = p_userid and state='0';

解决方案 »

  1.   

    ORA-01403 no data foundCause: In a host language program, all records have been fetched. The return code from the fetch was +4, indicating that all records have been returned from the SQL query.Action: Terminate processing for the SELECT statement.
      

  2.   

    ......
    exception 
      when no_data_found then 
         --这里写处理,如果没数据怎么处理,
      when others then 
        null;
    end;