Calling sp_send_dbmail: successful execution, but at the ends appear an extra line with rows affected by the query.
Is there any way to avoid thiks line?
Thanks!!!
Calling sp_send_dbmail: successful execution, but at the ends appear an extra line with rows affected by the query.
Is there any way to avoid thiks line?
Thanks!!!
What cgsabari says is true but incomplete. You need to set NOCOUNT
in the query you are passing to @query
parameter. Otherwise it won't work
Try the below query
SET NOCOUNT ON
--some queries
SET NOCOUNT OFF
It avoids the row(s) affected message.