Emailing the results of a query

  • Hi, I would like to automatically email the results of Monitor Database Growth script by Brandie Tarvin to my Application team. I'm fairly new to SQL and have been trying to use the xp_sendmail SP. Does any one have any help on how I can do this?

    Many Thanks

  • Being that you are 2005 you should look at using sp_send_dbmail. The parameters @attach_query_results_as_file and @query are the key ones you are going to need.

    Post with any problems or other questions.

    David

    @SQLTentmaker

    “He is no fool who gives what he cannot keep to gain that which he cannot lose” - Jim Elliot

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

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