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 |
|
fmardani
Constraint Violating Yak Guru
433 Posts |
Posted - 2005-01-12 : 11:08:14
|
| Hi,There is a trigger on TableA on insert.The trigger does an insert into TableB if there is an insert in TableA.If there is one insert into TableA thAn there will be one insert into TableBBut what if there are several inserts in one go into TableB?Does this mean that there will be several inserts into TableB in one go?This is because, in TableB there are now 100,000 records with an exact time (even to the millisecond)?How could this have happened?Thanks |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2005-01-12 : 11:33:56
|
| The trigger will be fired once for each insert statement. If there are several rows inserted in that statement then those rows will all be in the inserted virtual table and this can be used for the insert into tableB.seehttp://www.mindsdoor.net/#Triggers==========================================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. |
 |
|
|
|
|
|