sql-serverstored-proceduresssisetlexecute-sql-task

How to use output parameter in SSIS execute sql task from a stored procedure


Using a parameter, @IsSuccess in stored proc. How to use that @IsSuccess parameter in SSIS Execute SQL Task and take that as output from that component to another component?

enter image description here


Solution

  • You should use the following SQL statement in the Execute SQL Task to store the stored procedure output into an SSIS variable:

    EXEC mystoredprocedure ? OUTPUT
    

    Then in the Execute SQL Task editor, go to the parameter mapping form and select the SSIS variable you need to store that value.

    More details can be found in the following article:

    After storing that value, you should use this variable within the precedence constraints expressions: