Reputation: 383
I have an SSIS package in which I am returning the results of a query into a collection. My query is returning 8 columns. For example:
first name
last name
employee
id
city
state
zip
hire-date
I am iterating through each item in the collection and do some manipulation in a For-each loop container.
I need to pass in a 9th element to the collection which is a package variable.
Example: Active_Flag
How would I go about that? One approach I am thinking is to read the collection into an array in a script task and add the 9th element to it.
I tried this, but the collection couldn't read it and I keep getting a
"Error: The enumerator failed to retrieve element at index "9".
Any ideas how I could go about this?
Upvotes: 1
Views: 428
Reputation: 5246
There are several approaches to your problem:
EvaluateAsExpression=true
and Expression
property like="Select ..., '"+(DT_WSTR, 10)@[User::YourVariable]+"' AS [ninethcol] from ..."
Upvotes: 1