Declare a varchar variable for the recipient e-mail addresses, assign the values to it, use it when calling sp_send_dbmail.
declare @To varchar(max);
select @To = @EmployeeEmail + ';' + @ManagerEmail;
exec msdb..sp_send_dbmail @recipients = @To;
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon