I'm using the following query to pull report data. How do I modify this query so that I can send an email when the total count from this query is more than 100.
I will put this in a stored procedure than use the SQL Agent to run the task on a schedule.
asked Jul 22, 2013 at 04:41 PM in Default
Please see these links:
It describes how to send emails using T-SQL Code.
FYI - You'll have to unable this option on your server first and then get the proper permissions. Everything is described in the links above. Please read link #1 first, to understand "How To" in link #2.
Hopefully that helpds!
answered Jul 23, 2013 at 02:50 PM