This is my SQL code:
这是我的SQL代码:
CREATE OR REPLACE TRIGGER Promjenaplacanja
BEFORE UPDATE
ON Placanje
FOR EACH ROW
DECLARE
v_PlacanjeID NUMBER(10,0);
v_Starinacin NVARCHAR2(50);
v_Novinacin NVARCHAR2(50);
BEGIN
BEGIN
SELECT :OLD.PlacanjeID ,
:OLD.Nacin_Placanja
INTO v_PlacanjeID,
v_Starinacin
FROM DUAL ;
SELECT :NEW.Nacin_Placanja
INTO v_Novinacin
FROM DUAL ;
INSERT INTO Auditplacanja
( PlacanjeID, Starinacin, Novinacin, Datum )
VALUES ( v_PlacanjeID, v_Starinacin, v_Novinacin, SYSDATE );
END;
END;
But I got these two errors:
但我犯了两个错误
Error(16,7): PL/SQL: SQL Statement ignored Error(16,19): PL/SQL: ORA-00942: table or view does not exist
错误(16,7):PL/SQL: SQL语句忽略错误(16,19):PL/SQL: ORA-00942:表或视图不存在
I don't get it, can anyone help? :\ Thanks.
我不明白,谁能帮忙吗?:\谢谢。
1 个解决方案
#1
3
Table or view does not exist. Your trigger points to a table in 2 places:
表或视图不存在。您的触发器指向两个位置的一个表:
1) Creation of the trigger: placanje
1)触发器的创建:placanje
2) The insert statement: auditplacanja (perhaps auditplacanje?).
2)插入语句:auditplacanja(也许auditplacanje?)。
Do both of these tables exist (in the schema you run the code)?
这两个表是否都存在(在运行代码的模式中)?
#1
3
Table or view does not exist. Your trigger points to a table in 2 places:
表或视图不存在。您的触发器指向两个位置的一个表:
1) Creation of the trigger: placanje
1)触发器的创建:placanje
2) The insert statement: auditplacanja (perhaps auditplacanje?).
2)插入语句:auditplacanja(也许auditplacanje?)。
Do both of these tables exist (in the schema you run the code)?
这两个表是否都存在(在运行代码的模式中)?