Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 18 Jan 2006 @ 11:35:39 GMT


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


Subj:   Aborting an Update (or Insert) within a Trigger
 
From:   David Clough

I'd like to prevent updates (or inserts) on TableB based upon certain values in its parent TableA. Specifically I'm going to restrict a column value on the Child to 'P' (for Purge) if the Parent table has an equivalent column set to 'P'. Put another way, you can only Purge entries on TableB if Purging is the set approach on the equivalent Parent key on TableA.

I think I can code it but I can't find out how to Signal Error. Does anyone have an example of Aborting an Update (or Insert) within a Trigger?

Thus far I have created column Check constraints on these tables and Referential Integrity, so it's pretty secure already but it's just this last possible loop-hole I'd like to plug.

Thanks in advance.


_______________________
Dave Clough
Database Designer
Express ICS

www.tnt.com



     
  <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