EXEC msdb.dbo.sp_send_dbmail
@profile_name = @DbMailProfileName,
@recipients = 'asd@aaa.com;zxc@aaa.com',
@subject = N'Put email subject',
@body=N'See attachment',
@execute_query_database = N'DBA',
@query = N'EXEC [dbo].[ MyProcedure] @MinDelay=30',
@attach_query_result_as_file = 1,
@query_attachment_filename = 'result.csv',
@query_result_separator=@tab,
@query_result_width = 32767,
@query_result_no_padding = 1
No comments:
Post a Comment