Archives of the TeradataForum
Message Posted: Tue, 01 Aug 2000 @ 16:29:12 GMT
Subj: | | Trigger question |
|
From: | | Steve Bracewell |
Attempting to implement a trigger that would delete from another table when the subject table is being deleted from. Both are small
dimension tables. Below is the syntax for the trigger.
REPLACE TRIGGER TEST.XXXXX ENABLED
BEFORE DELETE ON TEST.TABLEA
REFERENCING OLD AS DELETEROW
FOR EACH ROW
(DELETE FROM TEST.TABLEB WHERE COLB = DELETEROW.COLB;);
All proper rights are granted for the databases, tables, users, etc. When the subject table is deleted from (using bteq) there is no
delete activity on tableb, and obviously no error messages are generated. Ideas? Have tried multiple variations of the above with no
affect.
P.S. Are many of you utilizing triggers? We have found them useful in 'non-update' cases (ie; populating a table of changes from insert,
delete, or update activity) and using that table to spawn activities outside Teradata platform.
Thank you....
|