Trigger – INSERT SELECT | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive


Dear friends, i need to know how i have to do to execute a trigger ‘n’ times when a execute a command line like this: insert table1
select * from table2 I this kind of command line, the table1 trigger execute just one time, but insert ‘n’ rows in table1 table. When i execute the following command, the table1 trigger executes ‘n’ times:

while @i<[email protected]
insert table1(field1,field2) values(value1,value2)
select @[email protected]+1

You want to fire a trigger ‘n’ times when you insert a single row into trigger table?
Microsoft SQL Server MVP
Moderator All postings are provided “AS IS” with no warranties for accuracy.

Similar to Madhivanan Failing to plan is Planning to fail
THis thread is locked as you have further clues from Frank over there.
Satya SKJ
Microsoft SQL Server MVP
Writer, Contributing Editor & Moderator
@ This posting is provided AS IS with no rights for the sake of knowledge sharing. Knowledge is of two kinds. We know a subject ourselves or we know where we can find information on it.