Package Validation Error - Type of variable @[User::variable] is not a string

  • Hi All,

    Am getting the following error:

    Package Validation Error - Type of variable @[User::variable] is not a string

    I've 3 variables, var1 => select count(*) from table1,

    var2 => select count(*) from table2, and in var3 am comparing these two

    variables like => @[User::varCount] == @[User::varRowCount]

    Now the problem is in var3, when i use this var3 in Execute SQL Task => made

    the SQLSourceType as Variable and mapped the SourceVariable to var3, but in

    var3 if i turn on EvaluateAsExpression to True means Variable's ValueType

    coming to Boolean and Value to True, when use this var3 in Execute SQL Task

    it throws Type of variable @[User::var3] is not string.

    :crying:

  • SQLSourceType of the Execute SQL Task means that the SQL command can be found in a variable, so it is expecting a string.

    To use your variable in an Execute SQL Task, you need to use the parameter mapping and the question mark placeholder in your T-SQL statement.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply