Home Forums SQL Server 2008 T-SQL (SS2K8) Always set a Field to NULL - is a trigger the answer RE: Always set a Field to NULL - is a trigger the answer

  • I'd stick with the AFTER trigger. Your initial trigger was pretty much spot on.

    In case you create other AFTER triggers later, you might want to explicitly designate that trigger as the first (or last) one to fire after an INSERT/UPDATE:

    EXEC sp_settriggerorder @triggername = 'dbo.tr_Cust_insupd',

    @order = 'FIRST', @stmttype = 'INSERT'

    EXEC sp_settriggerorder @triggername = 'dbo.tr_Cust_insupd',

    @order = 'FIRST', @stmttype = 'UPDATE'

    SQL DBA,SQL Server MVP(07, 08, 09) A socialist is someone who will give you the shirt off *someone else's* back.