Pass Variable

  • 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.

  • You will have to do dynamic sql.



    Clear Sky SQL
    My Blog[/url]

  • 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

  • Try this link

    http://blog.boxedbits.com/archives/34



    Clear Sky SQL
    My Blog[/url]

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply