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
joraim
joraim
Forum Newbie
Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: General Forum Members
Points: 3 Visits: 10
PAul

Ipm sorry I can not get the variable runs: I get the next error:

Error: 0xC002F309 at Execute SQL Task, Execute SQL Task: An error occurred while assigning a value to variable "Variable": "Result binding by name "TesteMail" is not supported for this connection type. ".


I set the SQL Task same as you mention, but this error is what I get on Red, when Running on SSI

Can you please help thanks

Regards

Jorge G
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
The first thing I'd do is check the output - see if you're getting valid HTML that includes the images you want to see before this gets attached to or included in your mail. If this looks right then I'm inclined to think that the images are being stripped somewhere along the line by your mail server, or something external to SSIS in any case.

To boil it down, first make sure whether or not the issue is due to what you're doing in SSIS.
emadhanna
emadhanna
Forum Newbie
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: General Forum Members
Points: 2 Visits: 7
Paul,

I have a question. The Script Task is working fine, except for one thing. It sends the email is all cases if there is data or none. When there is no data returned from the SQL Query, it sends the email with the Table Header only. How can I control sending the email, by telling the script to send the email only in one case, if there is data returned from the SQL Query. Can you help me with that.

Mac Hanna
Philippe Cand
Philippe Cand
SSC-Enthusiastic
SSC-Enthusiastic (114 reputation)SSC-Enthusiastic (114 reputation)SSC-Enthusiastic (114 reputation)SSC-Enthusiastic (114 reputation)SSC-Enthusiastic (114 reputation)SSC-Enthusiastic (114 reputation)SSC-Enthusiastic (114 reputation)SSC-Enthusiastic (114 reputation)

Group: General Forum Members
Points: 114 Visits: 294
Test existence of data and set a variable to 1 or 0. Then add an expression to the flow line to evaluate the variable so the mail task runs only if the condition is met.

BI Guy
emadhanna
emadhanna
Forum Newbie
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: General Forum Members
Points: 2 Visits: 7
I'm sorry I didn't get it, can you explain that in detail. I cannot follow where I can do that
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