May 16, 2011 at 1:02 am
Hi,
I'm working on a report from sql and i write a script that give me the desired report and i insert it into a table and send it from the sql to my email.
i have a problem with the html and the outlook that not support some code in the html and i need to take the html code from the column and insert it into an HTML file through the SQL.
how i can achieve that?
THX
May 16, 2011 at 8:06 am
Are you saying that outputting HTML from SQL doesn't email well?
and the resolve you need to do is to put the HTML into a file and email the file ?
May 16, 2011 at 8:18 am
the output from the sql and send it direct to the email body isn't working like it work in a regular html file.
May 16, 2011 at 8:49 am
I'd run that through a VB script then - you can run the SQL query - output to a file and then use VB to set up the email to send out via SMTP.
I do this for all my automated tasks ...
May 16, 2011 at 10:10 am
still how can i achieve that through the sql server?
May 16, 2011 at 10:14 am
JOB, STEP, VB script
DTS and SSIS should be able to handle that as well.
May 20, 2011 at 4:23 am
can it be done somehow with the xp_cmshell that can take the table and insert it to html file?
May 20, 2011 at 6:18 am
possibly... but you might as well use bcp out and maybe try to edit the html file after is it's not 100% correct.
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply