I have an Execute SQL task
in my SSIS package that should execute a SQL stored procedure only if a certain condition is true.
I have a user variable [User::run]
that gets a value when the package is started. In my SQL task, I have the following code:
declare @run varchar(1)
set @run = '" + @[User::run] + "'
if @run = 'Y'
begin
EXEC sp_procedure()
end
However, the stored procedure never gets executed. Any help or suggestions would greatly be appreciated.