November 3, 2009 at 1:33 am
Hi All
I would like to pass Source db/table name and destination db/table name with help of parameter/variable to my Execute SQL task in SSIS.
The query would be like-
INSERT INTO <dest_db_name>.[dbo].<dest_tbl_name>
SELECT * FROM <src_db_name>.[dbo].<src_tbl_name>
All the values is <> needs to be changed because at destination the name of db, tables are not known
I know to pass paramater in where clause but something like this I never know is it is possible. I tried making src and dest variable and tried mapping it but always fails.
Can you all suggest how can I accomplish this.
November 3, 2009 at 1:45 am
You will have to do dynamic sql.
November 3, 2009 at 1:48 am
it would be dynamic SQL statement but how will I map the db name to the parameter in SSIS.
can you also please give an example
November 3, 2009 at 2:16 am
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply