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 |
|
tpcolson
Starting Member
5 Posts |
Posted - 2011-07-05 : 16:08:59
|
| I have the following trigger:Create trigger [dbo].[new_Location]on [dbo].[TBL_LOCATIONS]for insertasinsert into dbo.tbl_Events ( Event_Id , Location_Id )SELECT NewID(), Inserted.Location_Id FROM InsertedWhich works fine on single-record inserts, however, on multiple row inserts to tbl_Events (batch load) the trigger doesn't fire. How can I modify it to work for multiple record inserts? |
|
|
nigelrivett
Master Smack Fu Yak Hacker
3385 Posts |
Posted - 2011-07-05 : 16:17:51
|
| Should work for ,ulti row inserts - what happens when you try?Could be the batch load isn't firing the trigger - nothing to do with the trigger. How are you doing this and is there an option to fire triggers?==========================================Cursors are useful if you don't know sql.SSIS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
GilaMonster
Master Smack Fu Yak Hacker
4507 Posts |
|
|
|
|
|