pass SSIS Variables to SQL Procedure in SSIS

  • hi,

    I have two varibles .....

    I want to execute the sp with two variables as parameters...

    Execute testing.dbo.proc_TEmptest value1,value2

    The value1 and value2 are the SSIS values of variables.

    Please help how to pass the SSIS variables to SP as parameters

    Thanks,

    Pulivarthi

  • Try the following:

    create a variable of type string. Let's call it str_ExecSP.

    Populate this variable with the following expression:

    "EXEC dbo.proc_TEmptest " + (DT_WSTR,50) @[User::value1] + " , " + (DT_WSTR,50) @[User::value2]

    Then use this variable in an Execute SQL Task. As SQLSourceType, select variable.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • You can set up an ExecuteSQLTask. Put the call your sp as :

    exec testing.dbo.proc_TEmptest ?,?

    (The '?' are the place holders)Now map these two question marks to the SSIS variables in your package by going to the parameters tab in the ExecuteSQLTask.

  • mp83399 (8/28/2012)


    You can set up an ExecuteSQLTask. Put the call your sp as :

    exec testing.dbo.proc_TEmptest ?,?

    (The '?' are the place holders)Now map these two question marks to the SSIS variables in your package by going to the parameters tab in the ExecuteSQLTask.

    I sure hope the OP solved his problem 2 years ago 😉

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

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

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