proc

Last Post 08 Jan 2010 11:08 AM by sql-tips. 1 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
sql-tips
New Member
New Member

--
08 Jan 2010 08:46 AM
I need to send output of the stored proc to a email on regular intervals. What is the best way of doing this. Thanks for any help.
sql-tips
New Member
New Member

--
08 Jan 2010 11:08 AM
I created following I get email but the body gives me 0 instead of complete results of TestProc.

declare @body varchar(8000)
exec @body = TestProc
EXEC msdb.dbo.sp_send_dbmail
@recipients = 'test@companyinc.com',
@body = @body,
@subject = 'proc output from database';
You are not authorized to post a reply.

Acceptable Use Policy