Link to home
Start Free TrialLog in
Avatar of Ali Shah
Ali ShahFlag for United Kingdom of Great Britain and Northern Ireland

asked on

How to convert VARCHAR to BOOL in SSIS and assign to a variable

Hi guys,

In SSIS I have am saving a value of "TRUE" OR "FALSE" in a variable. The data is coming as VARCHAR (I am not allowed to convert varchar in SP)

How to convert this varchar to bool in SSIS and assign it to a variable? Am i doing correct thing in variable window?

@[User::InvokeNoDataReturnError] = (DT_BOOL)"TRUE"?1:0

Open in new window


When i try the above code i get the following error message

Error: Cannot evaluate expression "@[User::InvokeNoDataReturnError] = (DT_BOOL)"TRUE"?1:0" because the variable "User::InvokeNoDataReturnError" does not exist or cannot be accessed for writing. The expression result cannot be assigned to the variable because the variable was not found, or could not be locked for write access.
ASKER CERTIFIED SOLUTION
Avatar of Dung Dinh
Dung Dinh
Flag of Viet Nam image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial