GOODS (6/27/2014)
Hi Gail,One more question if I want multiple users to receive the email.how would I go about scripting it?
Isn't recipients a semi-colon deliminated list? Try: -
EXEC msdb.dbo.sp_send_dbmail
@profile_name = 'SystemAlerts',
@from_address = 'DBAlerts@blake.co.za',
@recipients = 'Dlozi.Nzuke@interactivesa.co.za;nivashan.govender@interactivesa.co.za',
@query = 'exec SP, Sp_Compare_Acc_Comment' ,
@execute_query_database = 'IS_ND_BLAKE',
@subject = 'Compare Table',
@attach_query_result_as_file = 1 ;