I need to do a loop over comany names using ssis What I did
- Declare a SSIS variable of Object type.
- Through a SQL task execute a query ("select distinct Name from dbo.company") & - fill you variable in result set.
- Apply a For Each Loop.
- In the collection tab of loop -> Select Enumerator as "ForEach ADO Enumerator"
- Select your variable in the ADO object source
- Set the Enumeration mode as "Rows in First table"
I add a variable varcompany
with expression
"SELECT * FROM dbo.[" + (DT_STR) @[User::VarCompanyName] + "$Agents de recouvrements]"'
Then I choose data access mode Sql command from variable varcompany
But it doesn't work I got the following error :
Description: "Incorrect syntax to '+'. '.
How to correct it ?