email details from SQL Server agent based on query results?
hello,
i want remove records database automatically, important me know (email) if there records or not , how many affected automatic task...
my job scheduled run every day , like:
delete radioactivematerials
where (notexplosive = true)
set @rowcount_var = @@rowcount
i detail on deleted records, how can produce email?
if using sql 2005, using books online, refer topic: 'database mail how-to topics'.
if using sql 2000, suggest check out xp_smtp_mail here. most folks recommend not use mapi mail on sql server.
SQL Server > SQL Server Tools
Comments
Post a Comment