Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 01 Aug 2000 @ 16:29:12 GMT


     
  <Prev Next>  
<<First
<Prev
Next> Last>>  


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....



     
  <Prev Next>  
<<First
<Prev
Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023