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.
| Author |
Topic |
|
eddie
Starting Member
45 Posts |
Posted - 2001-03-13 : 16:56:31
|
| Hello, I have two triggers, an insert and update, with virtually the same code (the insert code just checks more things before the raiserror is fired) but when the update trigger is fired I get an error that it needs a begin transaction. Why would the update trigger require a begin transaction but the insert trigger not? Begin Declare @testcount int select @TestCount = (select count(*) from mytable mt, inserted where mt.object = '1' ) if (@TestCount = 0) begin raiserror 30001 'Update not allowed.' rollback transaction returnendThanks,Eddie |
|
|
|
|
|