October 15, 2009 at 2:57 pm
I'm using sp_send_dbmail and would like to email the rowcount against multiple tables. The format I'm looking for is something like this...
A little msg here indicating that the nightly import job succeeded and that the following tables below were populated with the number of rows....
1) Table one: 1000 rows
2) Table two: 2000 rows
3) Table three: 3000 rows
I've tested sp_send_dbmail but am only able to email the result of a single table. Any suggesstion on how to do this against multiple tables using the (newline) format above? Thanks!
October 16, 2009 at 10:43 am
dlapitan (10/15/2009)
I'm using sp_send_dbmail and would like to email the rowcount against multiple tables. The format I'm looking for is something like this...A little msg here indicating that the nightly import job succeeded and that the following tables below were populated with the number of rows....
1) Table one: 1000 rows
2) Table two: 2000 rows
3) Table three: 3000 rows
I've tested sp_send_dbmail but am only able to email the result of a single table. Any suggesstion on how to do this against multiple tables using the (newline) format above? Thanks!
You have to have a variable combining all results. Then after each execution you have to append to this variable, the result text of each table importation. At the end of the execution modify the combined variable with your final email text and then use it in the send mail task.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply