email users depending on result of query

  • Hi, what is the easiest way to email users if a query returns any records?  Do DTS packages have functins for this or do we go the run a query from a Agent job?

    Case is like this, if a query returns more than 0 records we want to notify two users via email.  email is set up on the server.

     

     

  • You should be able to add an Execute SQL Statement step into your DTS.  Then use XP_SendMail in the SQL statement.

    Brian

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply