Schedule and e-mail query results in HTML formated email

  • Could anyone walk me through how to do the following:

      • Schedule a query to run at a designated time
      • Embed the resulting table in a HTML email
      • Email the HTML formated results someone automatically

       

      Can this be done with SQL Server only or is there a third party app?

       

      I know its alot but I'm having a hard time finding resourses.

    • This was removed by the editor as SPAM

    • A couple of suggestions:

      The simplest option might be to formulate a query that builds the HTML that you want to be the body, and then use the SQL mail agent via DTS or stored proc to send them out. DTS jobs and stored proc execution can easily be scheduled via SQL Agent. This would work for simple reports.

      Another route might be using Notification Services, which is a free add on for MSSQL 2k. You can download it from Microsoft.

    • this is so simple. we can do it in 2 steps.

      step 1: build the html file using sp_makewebtask

      step 2: by using the sp_smtp_sendmail, you can send mail.

      and sp_smtp_sendmail is a third party SP you can get it from http://www.sqldev.net/xp/sp_smtp_sendmail.htm

      you can make it as a job and then schedule it to achive your needs.

    Viewing 4 posts - 1 through 3 (of 3 total)

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