Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 21 Apr 2006 @ 20:51:57 GMT


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


Subj:   Re: Trigger Problem
 
From:   Victor Sokovin

Hi Michael,

  Thanks for the thought Victor. I am a little confused regarding your posting and hope that maybe you can help me understand what you mean by: "BEFORE row triggers cannot have data-changing statements as triggered action SQL statements"  


I feel like I am always learning the triggers myself. Their idiosyncrasies and limitations defy my memory's capacity and I have to open the manual any time I am confronted with the subject. The sentence above is the quote from the manual (SQL DML Ref). I thought it would be better to include this quote rather than post an anonymous error message that I got when I changed the working AFTER trigger into a non-working BEFORE one.


  I am asking because a row trigger only allows an INSERT and it contains an INSERT. So, it is the "data-changing" part that has me scratching my head. I am always interested in learning something new that I personally haven't experienced.  


Well, my trigger just contained one INSERT statement, very close to the one in the original posting in this thread. It worked fine in the AFTER trigger (well, "fine" might be an exaggeration; it was working - shall we say - like described in the original posting) but the BEFORE trigger with the same INSERT would not compile at all. I understand that it is because of this ANSI compliance prohibiting data-changing statements.

I hope this clarifies my findings so far? I must admit I was a little shocked to explore all this today. This is not likely to convert me to a supporter of active usage of triggers, and this applies not only to Teradata.


Regards,

Victor



     
  <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