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)
 error in trigger

Author  Topic 

matt_calhoon
Posting Yak Master

235 Posts

Posted - 2005-02-24 : 01:27:41
hi there,

if an update trigger returns an error, is it possible to still continue with the update?

if not would a work around be to apply several update triggers to a table, and if one returns an error, the other triggers will still continue thus allowing the update to go through?

I have 2 sql statements in 1 update trigger. Im thinking maybe I can separate the 2 sql statements into separate triggers, so if one fails the other still continues and the update occurs.

nr
SQLTeam MVY

12543 Posts

Posted - 2005-02-24 : 01:52:52
A trigger is run in the firing statements transaction. You will probably find that an error will roll back the whole transaction.

The sort of thing you are trying to do is usually accomplished by putting the command into a table and having a separate scheduled job action it.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -