This is my SQL code:
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
I don't get it, can anyone help? :\ Thanks.