I really hope I can get some input on this. I'm trying to create an SSIS package with SQL Statement with "IN" in WHERE clause (ex: SELECT * FROM Oracle.Table1 WHERE Col1 IN (?) ). Basically, an Oracle SQL Statement with values from a SQL Server table. I've searched and can't find anything. Any suggestion will be greatly appreciated:
- Can I use an "IN" keyword with values in object variable?
- I've seen methods where "ForEach" component is used. Wouldn't this create a SELECT statement for each value? Potentially, thousands of records.
I've tried the following:
Used SQL Command with statement: SELECT * FROM Oracle.Table1 WHERE Col1 IN (?) - where ? is an object variable (resultset 1 col from a SQL Server statement) When I try to select "parameter", I get an error message.
Used SQL Command from Variable with an expression in a variable: "SELECT * FROM Oracle.Table1 WHERE Col1 IN (" + @[User::Obj_values] + ")"
FYI: I only have read permission to the Oracle DB :(