I had defined a variable Test which is @[User::Test] with string value "abc".
My question is can I set the sql command that update my table where my column value = my variable ?
example.
update tableA set ValueB = '1pm' where ValueA = '" + @[User::Test] + "'
But this is not working for me. How to solve it ?
You have to use a question mark in the SQL text and bind the variable using the query configuration (IIRC, it was the
Parameter Mapping
tab). For example, I used to do stuff like this:Here, I found a screenshot in Google: https://www.simple-talk.com/iwritefor/articlefiles/1455-SsisVariables_Fig11-620x524.jpg