Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 SQL Trigger

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-11-21 : 11:33:10
Dean writes "This probably sounds TOO simplistic, but all the examples I've researched don't address this issue.

I have a simple business rule I need to enforce in my SQL 7 database: If a certain field ("MyField") in a certain table ("MyTable") is NULL, I need to change it to an 'N' when the record is stored in the database (this might seem to be an application issue, but I have a 3rd party application that populates this database, and I don't control the source code for that app --- however, I *do* control the SQL database).

I've tried to concoct a SQL trigger on the "MyTable" table that will fire whenever an INSERT or UPDATE tries to set the field to NULL...but I can't seem to get it to function. Can you recommend a simple way to accomplish this trigger?"
   

- Advertisement -