Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Question and troubles with triggers (8i)

Question and troubles with triggers (8i)

From: COAST <coast_at_cedes.com>
Date: Thu, 12 May 2005 15:26:08 +0200
Message-ID: <42835973$0$298$4d4ef98e@read.news.ch.uu.net>


Hi list

I'm having the following table and trigger:

TABLE CO_FUNCTION

fieldA anyDataType;
fieldB anyDataType;
fieldC anyDataType;
fieldD anyDataType;

TRIGGER "CO_FUNCTION_INSUP" BEFORE INSERT OR UPDATE ON "CO_FUNCTION" FOR EACH ROW DECLARE
    some declarations;
BEGIN
  IF INSERTING THEN
    do something on insert with fieldA;
  ELSIF UPDATING THEN
    do something with fieldB if any field is changing;   END IF;
END; Now my question / troubles:

If I'm using UPDATE, but I don't say "OF" at all, will the trigger fire for each field (fieldA, fieldB, fieldC, fieldD) ?

I could not find any documentation what's really happening if the keyword "OF" is missing.

This trigger is working properly, but we have seen that this trigger is not firing after some time, the trigger seems to be o.k. but just not firing. After deleting the trigger and reinstalling the trigger, the trigger is firing again.
But I don't know what happened causing the trigger not firing any more.

Then I have some other mysterious thing: DBA studios (8i, W2K, German version) says that the trigger should fire for fieldA and fieldB but not with fieldC and fieldD. It seems that DBA studio is not telling the truth. If I load the trigger with a third party tool for editing it says still: TRIGGER "CO_FUNCTION_INSUP" BEFORE INSERT OR UPDATE ON "CO_FUNCTION" FOR EACH ROW but DBA would say:

TRIGGER "CO_FUNCTION_INSUP" BEFORE INSERT OR UPDATE OF "FIELDA", "FIELDB" ON "CO_FUNCTION" FOR EACH ROW Strange story, isn't it ?

Thanks for any hint
Peter Received on Thu May 12 2005 - 08:26:08 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US