RE: User-defined functions in WHEN clause of a trigger

2002-09-12 Thread Jamadagni, Rajendra
Title: RE: User-defined functions in WHEN clause of a trigger Rich, Remove the when clause from trigger definition and put it inside. CREATE OR REPLACE TRIGGER my_trigger BEFORE UPDATE ON my_table FOR EACH ROW BEGIN If my_function = some_value then do_something_meaningful; end if; end

RE: User-defined functions in WHEN clause of a trigger

2002-09-11 Thread Naveen Nahata
Not sure but got a feeling that it has something to do with the Purity Level of the function. Something you declare with PRAGMA RESTRICT_REFERENCES For a function to be usable in the DMLs, it needs to satisfy a few purity rules, which also need to be explicitly declared using PRAGMA

RE: User-defined functions in WHEN clause of a trigger

2002-09-11 Thread Khedr, Waleed
From the docs: Restrictions:You can specify a trigger restriction only for a row trigger. Oracle evaluates this condition for each row affected by the triggering statement.You cannot specify trigger restrictions for INSTEAD OF trigger statements.You can reference object columns or their

RE: User-defined functions in WHEN clause of a trigger

2002-09-11 Thread Jesse, Rich
OK, I need to make another bookmark...I got distracted by the Conditions link in the text just above the text you quoted. Thanks, Waleed! Not the answer I wanted, but it is the correct answer... :) Rich Jesse System/Database Administrator [EMAIL PROTECTED]