我不确定下面的代码是否有问题,我一直得到ORA-01422:确切的提取返回超过请求的行数。感谢帮助。
Procedure SignLetter(vletterid in number,vrtype in number,vtitle in varchar,
vclose in number,vuserid in number, vmodifyby in varchar2,Error out varchar)
is
vsigntype number(1);
begin
insert into letterempinfo (id, letterid, empid,
title, usertabid, modifyby)
values ( s_letterempinfo.nextval,vletterid,vuserid,
vtitle,vuserid,vmodifyby );
if vrtype =1 then --preparer
update letterheader
set prepareid=vuserid,
preparedate=sysdate,
updatedate=sysdate,
usertabid=vuserid,
modifyby=vmodifyby
where id=vletterid;
if vclose =2 then
update letterheader
set letterstatusid=3,
updatedate=sysdate,
usertabid=vuserid,
modifyby=vmodifyby
where id=vletterid;
vsigntype:=2;
else
vsigntype:=1;
end if;
elsif vrtype =2 then --preparer
update letterheader
set reviewerid=vuserid,
reviewdate=sysdate,
updatedate=sysdate,
usertabid=vuserid,
modifyby=vmodifyby
where id=vletterid;
update letterheader
set letterstatusid=3,
updatedate=sysdate,
usertabid=vuserid,
modifyby=vmodifyby
where id=vletterid;
vsigntype:=2;
end if;
PACKNOTIFICATION.SendLetterEmail(vletterid,vsigntype,Error);
exception when others then
Error:=SQLERRM;
end;