Link to home
Start Free TrialLog in
Avatar of patd1
patd1Flag for United States of America

asked on

SSIS use database name as a parameter to sql task

Creating an SSIS packege. Is it possible to create a sql task that runs a query that uses database name as a parameter?

example : Insert into mydb.ssis.mytable1
Values
(Select * from ?.prod.mytable1)

The parameter values should be coming from a user variable. Is that possible?

Thanks.
Avatar of Jason Yousef
Jason Yousef
Flag of United States of America image

Yes of course, sure
Just add Expressions in a variable and it will do.
ASKER CERTIFIED SOLUTION
Avatar of stalhw
stalhw

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Or, perhaps, a better approach might be to use variables in the ConnectionManager for the Instance and catalog settings.
Avatar of Alpesh Patel