ORA-04093: references to columns of type LONG are not allowed in triggers
Kumar81Nov 23 2012 — edited Nov 26 2012I have two tables name as T1 and T2.
Desc T1
Name Type
-------------------
id number
text Long
Desc T2
Name Type
-------------------
id number
text Clob
My requirement is that whenever any record will insert/update/delete in T1, same record will also insert/update/delete in T2.
I have written trigger as row level but it is not working as it is showing below error
CREATE OR REPLACE TRIGGER T1_tr
BEFORE INSERT
ON T1 REFERENCING NEW AS NEW OLD AS OLD
FOR EACH ROW
DECLARE
BEGIN
IF INSERTING
THEN
INSERT INTO T2
(id,text
)
VALUES (:NEW.id, to_clob(:NEW.text);
END IF;
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.put_line (SQLCODE || SQLERRM);
END;
/
ORA-04093: references to columns of type LONG are not allowed in triggers
database:- Oracle 9i.
OS- Windows
is there any other way we can do the same operation.
Edited by: Kumar81 on Nov 22, 2012 10:47 PM