Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
lw1990
Yak Posting Veteran
85 Posts |
Posted - 2010-01-13 : 11:46:52
|
Hi, I’m using sp_send_dbmail to send an email and display a table in the email as a job scheduled every day. EXEC msdb.dbo.sp_send_dbmail@profile_name='emailProfile1',@recipients='AllManagers@mycompany.com',@subject = 'The following client(s) have complains listed below:’,@query = 'SELECT clientname1, ContactPerson, FilingDate, Telephone FROM dbo.ClientList'Then I can get the email correctly, but at the end of the email I always got another result line which is unnecessary to display.(16 rows affected)How can I stop displaying this line of result in the email.Thanks. |
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2010-01-13 : 11:54:18
|
@query = 'SET NOCOUNT ON;SELECT clientname1, ContactPerson, FilingDate, Telephone FROM dbo.ClientList' No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
lw1990
Yak Posting Veteran
85 Posts |
Posted - 2010-01-13 : 12:06:02
|
Right, thanks! |
 |
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2010-01-13 : 12:20:43
|
welcome  No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
|
|
|
|