Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> ORA-6512
Hi I have a problem with a update. I recive this error
ORA-00942: table or view does not exist ORA-06512: at "F0001.UPDATE_MASUPTR", line 21 ORA-06512: at line 1
when i execute this procedure:
begin
declare
Cursor SupTrUpDate
is
Select *
from F0001.SupTr_Gr;
SupTr_Rec SupTrUpDate%ROWTYPE;
BEGIN open SupTrUpDate;
loop
fetch SupTrUpDate into SupTr_Rec;
exit when SupTrUpDate%NOTFOUND;
UPDATE F0001.MaSupTr
set MaSupTr.PayedDt = SupTr_Rec.VoDt
where (MaSupTr.JNo = SupTr_Rec.JNo
and MaSupTr.EntNo = SupTr_Rec.EntNo)
or (MaSupTr.AgJNo = SupTr_Rec.JNo
and MaSupTr.AgEntNo = SupTr_Rec.EnTNo);
commit;
end loop;
close SupTrUpDate;
END; end;
F0001.SupTr_Gr is a view based on two other views lika this:
F0001.SupTr_Gr:
Select "JNO","ENTNO","VODT"
from SupTr_Inv
union
Select "JNO","ENTNO","VODT"
from SupTr_Pay
F0001.SupTr_Inv:
Select ST1.JNo, ST1.EntNo,ST1.VoDt
from MaSupTr MT, SupTr ST1, SupTr ST2 where MT.Jno = ST1.JNo and MT.EntNo = ST1.EntNo and MT.AgJno = ST2.JNo and MT.AgEntNo = ST2.EntNo and ST1.VoDt != ST1.ValDt and MT.PayedDt = ST1.ValDt and MT.PayedDt != ST1.VoDt and ST1.VoDt >= ST2.VoDt
F0001.SupTr_Pay:
Select ST2.JNo, ST2.EntNo,ST2.VoDt
from MaSupTr MT, SupTr ST2, SupTr ST1 where MT.AgJno = ST2.JNo and MT.AgEntNo = ST2.EntNo and MT.AgJno = ST1.JNo and MT.AgEntNo = ST1.EntNo and ST2.VoDt != ST2.ValDt and MT.PayedDt = ST2.ValDt and MT.PayedDt != ST2.VoDt and ST2.VoDt >= ST1.VoDt
User F0001 creates the procedure and executes it. F0001 has rights to execute any proc, update any table etc..
Line 21 is "UPDATE F0001.MaSupTr" table F0001.MaSupTr exists for sure.
what is wrong???
thanks /Patrik Received on Fri Jan 02 2004 - 06:56:24 CST
![]() |
![]() |