SSIS: How do I pass string parameter in an update statement in Execute SQL Task? -


i have 1 execute sql task in ssis 2012 has update statement. want pass string variable in clause of update statement. update section below:

where coalesce(s1.iteration, '') not '%?%' , s2.iteration = '?'

here, ? needs replaced string variable, in case 08152017. have added variable parameter mapping. screenshot attached.

the task executes not updates value in intended column. seems query not passing value.what doing wrong? how check sql inside execute sql task getting value variable?

create user variable % on it, example, variable name like_var data type string

"%" + @orig_var + "%" 

let's say, orig_var has value of 08152017, therefore like_var have %08152017%

then use like_var on parameter in execute sql task parameter 0, data type varchar in parameter mapping

where coalesce(s1.iteration, '') not ?    , s2.iteration = ? 

Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -