I have an ssis package that has a 'EXECUTE SQL TASK' that calls a stored procedure A that returns data.
THIS WORKS When there's data from Stored Procedure A then the downstream task Foreach Loop Container runs a Script Task which sends out an email with the subject='JOB SUCCESSFUL!' and a dynamic content with data from the STORED PROCEDURE A.
THIS DOES NOT WORK: When there's NO data in stored procedure A then I don't want to run the downstream task Foreach Loop Container. How do I do that (I'm using Visual Basic 2008 in the SCRIPT TASK)?
Please show me a step by step settings/configuration/code.
NOTE: I'm using SQL SERVER 2008R2.