4

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!!!

user2061430
  • 41
  • 1
  • 2

2 Answers2

4

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

Nicolasllk
  • 115
  • 1
  • 10
2

Try the below query

SET NOCOUNT ON
--some queries
SET NOCOUNT OFF

It avoids the row(s) affected message.

cgsabari
  • 506
  • 2
  • 7
  • 28