Result into HTML tables, send off in email... how? DTS?

  • I got the script to generate HTML tables from below:

    http://www.sqlservercentral.com/columnists/lsmith/usingcursormetadatatodynamicallygeneratehtmltables.asp

    I wrote a sproc to find "errors made by data entry" created the day before, (by comparing yesterday morning's result to this morning's result) and have it call the "generate HTML table" sproc above. Next, I would like to have the result sent off in an email.

    I can use xp_sendmail or xp_smtp_sendmail, I think xp_smtp_sendmail is better because it can use a html file as the email body. However, the problem is, both xp mail procedures are located on another SQL server. These are not linked servers, so I thought I'd use DTS, but somehow I can't spool the results as a plain txt file with a html extension.

    Any suggestions?

    Thanks.

  • oh also, the output from the "generate HTML table" sproc includes a header that looks messy when I copy and paste the result into outlook as html. (a wrapped long line). Anyway to discard the header when running the sproc?

    htmlString --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

  • SP_MAKEWEBTASK might help you ...

    you can pass as the output file a UNC path that resize on the needed server ( you need permissions for the server account to write to UNC path)


    Kindest Regards,

    Vasc

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

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