Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase «««56789

Sending scheduled SQL query results via HTML e-mail using SSIS Expand / Collapse
Author
Message
Posted Thursday, April 25, 2013 3:10 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, April 26, 2013 10:05 AM
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
Post #1446731
Posted Saturday, April 27, 2013 3:10 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Thursday, September 18, 2014 12:01 PM
Points: 43, Visits: 191
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.
Post #1447236
Posted Thursday, April 24, 2014 3:09 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, June 13, 2014 9:09 AM
Points: 2, Visits: 3
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
Post #1564898
Posted Thursday, April 24, 2014 3:19 PM


SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Friday, October 24, 2014 4:35 PM
Points: 49, Visits: 280
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
Post #1564900
Posted Thursday, April 24, 2014 3:32 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, June 13, 2014 9:09 AM
Points: 2, Visits: 3
I'm sorry I didn't get it, can you explain that in detail. I cannot follow where I can do that
Post #1564909
« Prev Topic | Next Topic »

Add to briefcase «««56789

Permissions Expand / Collapse