SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Sending scheduled SQL query results via HTML e-mail using SSIS


Sending scheduled SQL query results via HTML e-mail using SSIS

Author
Message
Paul Clancy
Paul Clancy
SSC-Enthusiastic
SSC-Enthusiastic (110 reputation)SSC-Enthusiastic (110 reputation)SSC-Enthusiastic (110 reputation)SSC-Enthusiastic (110 reputation)SSC-Enthusiastic (110 reputation)SSC-Enthusiastic (110 reputation)SSC-Enthusiastic (110 reputation)SSC-Enthusiastic (110 reputation)

Group: General Forum Members
Points: 110 Visits: 196
Thank you, sir! Glad to be of assistance.
BuilderBits
BuilderBits
Mr or Mrs. 500
Mr or Mrs. 500 (581 reputation)Mr or Mrs. 500 (581 reputation)Mr or Mrs. 500 (581 reputation)Mr or Mrs. 500 (581 reputation)Mr or Mrs. 500 (581 reputation)Mr or Mrs. 500 (581 reputation)Mr or Mrs. 500 (581 reputation)Mr or Mrs. 500 (581 reputation)

Group: General Forum Members
Points: 581 Visits: 251
Good lord...

I have it and did not realize it.

I never spend much time on the data server.

Erik

Dam again!
David McKinney
David McKinney
Ten Centuries
Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)

Group: General Forum Members
Points: 1259 Visits: 2090
Very good overview article, Paul.

I'm glad to see I'm not the only one writing about this stuff.

http://www.sqlservercentral.com/Authors/Articles/David_McKinney/155294/

I look forward to seeing what else you come up with.

David McKinney.
Paul Clancy
Paul Clancy
SSC-Enthusiastic
SSC-Enthusiastic (110 reputation)SSC-Enthusiastic (110 reputation)SSC-Enthusiastic (110 reputation)SSC-Enthusiastic (110 reputation)SSC-Enthusiastic (110 reputation)SSC-Enthusiastic (110 reputation)SSC-Enthusiastic (110 reputation)SSC-Enthusiastic (110 reputation)

Group: General Forum Members
Points: 110 Visits: 196
Thanks, David...I wish I'd seen your excellent XSL article back when I was figuring out how to get all this working; it would have saved me a lot of time. If you're interested there are a few more similar articles posted on my website at http://www.360data.nl/EN/News.aspx
Alberto Villarreal
Alberto Villarreal
Grasshopper
Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)

Group: General Forum Members
Points: 12 Visits: 14
is any way to get the same result but using SQL Server 2000, i don't know if there is a native tool or a third party one.

Ia have some reports, a lot of data i could distribute in html format, but actually i cant create an HTML file from a DTS.

Thanks in advance... Smile

Sorry about my english.. is not as good as I'd wish..
Paul Clancy
Paul Clancy
SSC-Enthusiastic
SSC-Enthusiastic (110 reputation)SSC-Enthusiastic (110 reputation)SSC-Enthusiastic (110 reputation)SSC-Enthusiastic (110 reputation)SSC-Enthusiastic (110 reputation)SSC-Enthusiastic (110 reputation)SSC-Enthusiastic (110 reputation)SSC-Enthusiastic (110 reputation)

Group: General Forum Members
Points: 110 Visits: 196
Hi Alberto,

Funnily enough, there is a way of doing almost the same thing in SQL 2000, but the way you do it is completely different. I used to have a home-mad alerting system running on SQL 2000 a few years ago that created a HTML summary page every 15 minutes from a SQL query result set.

How this worked would take an article in itself to describe, but the basic setup was to call sp_makewebtask with a predefined HTML template to define the HTML output, then call sp_runwebtask from a scheduled job to (re)create the actual HTML file with the formatted SQL query results. The next step of the job was to call SQL Mail with this file as an attachment.

There are all kinds of disadvantages to this method, but within the limitations of these SPs it works well and very reliably. Both SPs are reasonably well documented in Books Online. I hope this helps you.
Alberto Villarreal
Alberto Villarreal
Grasshopper
Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)

Group: General Forum Members
Points: 12 Visits: 14
Thanks Paul for answer my question.. so Ill try with the sp you've recommended..
s_kumarmsc
s_kumarmsc
Forum Newbie
Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)

Group: General Forum Members
Points: 5 Visits: 2
How can i do in sql server2000
it's possible in sql server
David McKinney
David McKinney
Ten Centuries
Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)

Group: General Forum Members
Points: 1259 Visits: 2090
s_kumarmsc (4/28/2008)
How can i do in sql server2000
it's possible in sql server


Why don't you read the previous posts :-)
Michael Jenck
Michael Jenck
SSC Rookie
SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)

Group: General Forum Members
Points: 25 Visits: 94
Great Article!

I had 1 problem on Step 9 - no variable showed up so I created one. Then it looked like the articles

When testing in step 10 the HTML is empty Sad I tested the SQL in Management studio and I see a XML result set returned.

I checked on the Variable and the value is

<ROOT><?MSSQLError HResult=\"0x80004005\" Source=\"Microsoft XML Extensions to SQL Server\" Description=\"No description provided\"?></ROOT>\r} String


Any ideas on what went wrong?

Thanks in advance!
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search