OLEDB Source with variable
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 cant 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
September 5th, 2012 10:23am

Put a value in your "test" variable. That value will only have an effect at design-time. Talk to me now on
Free Windows Admin Tool Kit Click here and download it now
September 5th, 2012 12:04pm

Put a value in your "test" variable. That value will only have an effect at design-time. Talk to me now on
September 5th, 2012 12:20pm

Assign some dummy value say 'A' in variable test in SSIS variable window. That would make variable Non empty and error will be gone. Please let me know if this does not solve your issue. Thanks, Abhiyanta ---------------------------------------------------------------------------- Please mark post as answer if it solves your issue. Thanks !
Free Windows Admin Tool Kit Click here and download it now
September 5th, 2012 3:51pm

Assign some dummy value say 'A' in variable test in SSIS variable window. That would make variable Non empty and error will be gone. Please let me know if this does not solve your issue. Thanks, Abhiyanta ---------------------------------------------------------------------------- Please mark post as answer if it solves your issue. Thanks !
September 5th, 2012 4:07pm

Thank you both, Todd and Abhiyanta, But just a Dummy Value did not work. I had to fill it with a real Tablename. So I assigned the Value "bookstore" to Test. Now the OLEDB directly finds the first right table.. Thank you very much. With kind regards. Tobi
Free Windows Admin Tool Kit Click here and download it now
September 6th, 2012 3:31am

Thank you both, Todd and Abhiyanta, But just a Dummy Value did not work. I had to fill it with a real Tablename. So I assigned the Value "bookstore" to Test. No the OLEDB directly finds the first right table.. Thank you very much. With kind regards. Tobi
September 7th, 2012 3:29am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics