I have a boolean type variable - pIsExists
I created an Execute SQL task to set this variable -
ResultSet: Single Row
SQLStatement: select 0 as test
I also tried: select 1 as test
select 'True' as test
REsult Set test mapped to pIsExists
Error: Execute SQL Task: An error occurred while assigning a value to
variable "pDataExists": "The type of the value being assigned to variable
"User::pDataExists" differs from the current variable type
please help,
tia - chris
matteus - 30 Jul 2008 08:51 GMT
> I have a boolean type variable - pIsExists
>
[quoted text clipped - 13 lines]
> please help,
> tia - chris
Try converting to bit data type the field your are using in the select
statement. Like:
SELECT CAST(0 as bit) as Bool
SELECT CAST('True' as bit) as Bool
Both worked here.
;)