Archives of the TeradataForum
Message Posted: Wed, 18 Jan 2006 @ 11:35:39 GMT
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.
|Copyright 2016 - All Rights Reserved|
|Last Modified: 27 Dec 2016|