Graham Reavey
Graham Reavey

Reputation: 25

SSIS SQL Task Parameter mapping

I've a stored procedure which outputs a bit datatype. I'm trying to map the output of the stored procedure to a variable in the SSIS package (@myVar) I'm running this from within a SSIS package and I'm trying to map the datatypes but I can't seem to figure out how to do this.

Output from Stored Procedure = bit
SSIS variable type @myVar = boolean
Mapped parameter = what??

There is no bit or bool in the tasks drop down menu, the closest is variant_bool which doesn't work, and I can't change the output type of the stored procedure - as it is somebody's else's code. Any Ideas, anyone?

Upvotes: 1

Views: 10135

Answers (1)

SqlKindaGuy
SqlKindaGuy

Reputation: 3591

Test code

create PROCEDURE dbo.uspGetTrueOrFalse
(
    @CustomerID int,
    @CustomerName nvarchar(101) output,
    @IsItTrueOrFalse bit output
)
AS
BEGIN
    SET NOCOUNT ON;
    SET @CustomerName = 'Red Bicycle Company';
    SET @IsItTrueOrFalse = 1; --Set to true

END;
GO

Setup SQL Tasks

enter image description here

Parameter mapping enter image description here

Execution status of variables enter image description here

Upvotes: 10

Related Questions