Skip to main content

The issue arises when trying to Evaluate an expression that contains a normal SQL Query and attempting to use a UserDefined Variable in the Expressions that have a data type other than WSTR (string). The error tells us that it cannot concatenate the two expressions together due to the mismatch in data types.  

 

 

To overcome this, you will need to cast the said datatype into a string for the expressions to be evaluated correctly. You can do so by changing the query and putting (DT_WSTR,50)  before the variable: @lUser::Variable1] 

 

 

Another way is to change the way this variable is evaluated. In Variable Properties, change EvaluateAsExpression to True and then below it you can control how this expression will be evaluated - (DT_WSTR,50) @TUser::Variable1]This workaround works for any data types other than string.