Hi!
I would like to send one mail each time an integrations services inserts a batch of rows. I,ve tested with this code but it sends one mail for each row that is inserted to the table. How to adjust the code below so it only sends one email?
Br Arne
CREATE TRIGGER trao_FOBOSTAFKbelopp ON FOBOSTAFKbelopp AFTER INSERT AS BEGIN EXEC msdb.dbo.sp_send_dbmail @profile_name = 'ArneSqlDatabasemail', @recipients = 'arne.olsson@ncc.se', @subject = 'Ny förkalkyl', @body = 'Hej! En ny förkalkyl har registrerats. För att titta på den klicka på bifogad länk. Hälsningar Arne' END
Arne Olsson