Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> User-defined functions in WHEN clause of a trigger
Hey all,
The subject says it all. In 8.1.7, can I:
CREATE OR REPLACE TRIGGER my_trigger BEFORE UPDATE ON my_table FOR EACH ROW WHEN (my_function = 'SOME VALUE') BEGIN blah.... END my_trigger;
Everytime I try to compile this, I get an "ORA-4076: invalid NEW or OLD specification". But I can specify a builtin function, e.g.:
WHEN (SYS_CONTEXT('USERENV','HOST') = 'MYHOST') I've RTFM'd and tried Metalink as well, but I haven't been able to find anything that says I can't use a user-defined function here.
Anyone?
Rich Jesse System/Database Administrator Rich.Jesse_at_qtiworld.com Quad/Tech International, Sussex, WI USAReceived on Wed Sep 11 2002 - 10:38:34 CDT