Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Trigger on table with Long
Hi,
I am trying to create trigger on a table having LONG column. The table structure is
table: acct
acct_id number; acct_group number ; acct_memo long;
The requirement is to store all the insert operations on this table and apply these changes to another database. As the table has millions of rows, it will not be feasible to do a daily export/import.
However, the trigger does not work ( the
:new.acct_memo is not supported - as acct_memo is a
long field). I next tried the following :
CREATE OR REPLACE TRIGGER ACCT_trigger
AFTER INSERT ON ACCT
FOR EACH ROW
DECLARE
memo_temp LONG;
CURSOR selectCursor IS
SELECT acct_memo FROM acct WHERE acct_id =
:new.acct_id;
BEGIN
OPEN selectCursor;
FETCH selectCursor INTO memo_temp;
CLOSE selectCursor;
INSERT INTO acct_changes VALUES
(:new.acct_id, :new.acct_group, memo_temp ) ;
END;
/
This results in ORA-04091 (Mutating trigger error).
Please advise me how to overcome these errors. Is there any work around for this problem ? What am I doing wrong here?
Thanks
Sukumar Kurup
-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Sukumar Kurup INET: sukuora_at_yahoo.com Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Sun Jul 08 2001 - 17:00:14 CDT
![]() |
![]() |