Hi Mike,
Is there a way to create a trigger which tests the value of a record being inserted, updated, or deleted?
For instance, a trigger is to test the length of an ISBN value being inserted into a table. A warning message should be printed if it is less than 10 characters.
Thanks,
Scott Brush
Yes, but...
This is possible. You would use the 'inserted' view to check the value, and a rollback transaction command to prevent the errant data from being added to the table. However, most people will use the check constraint to keep the data consistent, and will handle error reporting in their application.