满意答案
你要的应该是要改为如下declare
CURSOR RUIDLIST is SELECT a.ruid from DOC51DT a where a.docno=P_DOCNO ;
RUIDNUM number;
--RUIDNUM RUIDLIST%rowtype;open RUIDLIST;
loop
fetch RUIDLIST into RUIDNUMEXIT WHEN RUIDLIST%NOTFOUND;
UPDATE BASPLUPRC B
SET
B.MULRIPLE_MONEY=(SELECT FLOOR((B.SLPRC-B.CURCSPRC)/C.MULRIPLE_BASE) value
FROM BASPLUPRC B, DOC51DT A,BASDEPT C,BASPLUMAIN D ,DUAL
WHERE A.DOCNO=RUIDNUM
AND A.PLUID = B.PLUID
AND B.PLUID=D.PLUID
AND C.DPTID=D.DPTID
)
WHERE B.PLUID=(SELECT B.PLUID
FROM BASPLUPRC B, DOC51DT A,BASDEPT C,BASPLUMAIN D
WHERE A.DOCNO=P_DOCNO
AND A.PLUID = B.PLUID
AND B.PLUID=D.PLUID
AND C.DPTID=D.DPTID);
end loop;
close RUIDLIST;
00分享举报