Oracle® OLAP DML Reference 10g Release 1 (10.1) Part Number B10339-02 |
|
|
View PDF |
A TRIGGER_DEFINE program is a program that you create and that Oracle OLAP checks for by name when a DEFINE statement executes. When the program exists in the same analytic workspace in which you are defining a new object, Oracle OLAP executes the program.
Note: The USETRIGGERS option must be set to its default value ofTRUE for a TRIGGER_DEFINE program to execute |
See also: A TRIGGER_DEFINE program is only one of a number of trigger programs that you can write. You can write other trigger programs as described in TRIGGER command, TRIGGER_AFTER_UPDATE, TRIGGER_BEFORE_UPDATE, and "Trigger Programs". |
Syntax
To create a program with the name TRIGGER_DEFINE
, follow the guidelines presented in "Trigger Programs".
Notes
Oracle OLAP does not support recursive triggers. You must set the USETRIGGERS option to NO
before you issue a DEFINE statement within a TRIGGER_DEFINE program.
Examples
Example 24-13 A TRIGGER_DEFINE Program
Assume that you have written a TRIGGER_DEFINE program with the following description in your analytic workspace.
DEFINE TRIGGER_DEFINE PROGRAM PROGRAM SHOW JOINCHARS ('calltype = ' CALLTYPE) SHOW JOINCHARS ('triggering event = ' TRIGGER(EVENT)) SHOW JOINCHARS ('fully-qualified object name ='TRIGGER(NAME)) SHOW JOINCHARS ('type of object = 'OBJ(TYPE TRIGGER(NAME)) DESCRIBE &TRIGGER(NAME) END
Assume, as shown in the following statements, that you issue a DEFINE VARIABLE statement to define a variable named myvar
. As shown by the output following the statement, Oracle OLAP defines the variable and executes the TRIGGER_DEFINE program.
DEFINE myvar VARIABLE TEXT calltype = TRIGGER triggering event = DEFINE fully-qualified object name =MYAW!MYVAR type of object = VARIABLE DEFINE MYVAR VARIABLE TEXT