I'm trying to execute a sql script using the task in SSIS.
My script just inserts a bunch of nambe value pairs in a table. For example -
insert into mytable (name, value) values (?, 'value1'), (?, 'value2')
Now, I want to map a variable defined in SSIS to be mapped to the parameters in the statement above. I tried defining a scalar variable but I guess the sql task doesn't like that. Oh and all the name parameters in the insert statement resolve to a single variable.
For example I want insert into mytable (name, value) values ('name1', 'value1'), ('name1', 'value2')
When I open the Parameter Mapping tab for the task, it wants me to map each parameter invidually like -
Variable Name - User::Name Direction - Input Data Type - LONG Parameter Name - 0 Parameter Size - -1
Variable Name - User::Name Direction - Input Data Type - LONG Parameter Name - 1 Parameter Size - -1
This quickly gets out of hand and cumbersome if have 5-10 values for a name and forces me to add multiple assignments for the same name.
Is there an easy(-ier) way to do this?