Hello!
I working on a dynamically SSIS Package.
Now I am stuck at the OLDB Datasource. But from the beginning.
First I have a SQL Task Execute with a Variabel (VarCompany, Type is Object). As next I have a Foreach Loop
In there I have Script task to convert the Variable VarCompany to the variable Test as string. Then I added a third variable to my package, gesamt.
This is a of type string and EvaluateAsExpression = true
I entered the following String to "gesamt"
"SELECT Description FROM dbo.[" + @[user::test] + "$Item]"
Then I choose at the OLEDB Source "SQL Command from Variable" and choose for "User:: Gesamt"
Now my Problem. The Preview shows only "SELECT Description FROM dbo.[$Item]" because the variable Test is empty. I can´t save the oledb Source without errors.
My goal is to have the string as follows: SELECT Description FROM dbo.[bookstore$Item] and then for the other Item tables.
Bookstore is caught by the variable VarCompany
But how can I configurate it properly?
Thank you very much!
With kind regards.
Tobi