Hi. I'm indexing the DB with the use of triggers.
In one table, I have a LONG field, I need to read
the :new value of this field in the trigger, modify
it slightly, and insert the value into my context
indexed table.

I'm not allowed to query the table in the trigger
because of mutation, so I cannot do stuff like

  CREATE TRIGGER ... ON test_table
  FOR EACH ROW
  DECLARE
  tempContent LONG;

  CURSOR selectCursor IS
    SELECT long_field FROM test_table WHERE id = :new.id;

  BEGIN
  OPEN  selectCursor;
    FETCH selectCursor INTO tempContent;
  CLOSE selectCursor;

And I cannot reference the LONG field directly, eg. :new.long_field,
what can be done? I need to do the equivalent of
  BEGIN
    INSERT INTO other_table VALUES
('PREFIX'||:new.long_field||'POSTFIX');
  END;
In the trigger. Any help greatly appreciated.

Thanks

Morten

-- 
Morten Primdahl         Caput A/S       Tel +45 70 12 24 42
[EMAIL PROTECTED]        Nygade 6        Fax +45 70 11 24 42
http://www.caput.com/   DK-1164 Kbh K
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Morten Primdahl
  INET: [EMAIL PROTECTED]

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: [EMAIL PROTECTED] (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).

Reply via email to