How to assign values to the variable in ssis package

  • Hi..

    i have an ssis package and have created a variable called "Date".

    now what i want is... execute a store procedure and the

    result of the store procedure value should assign to the

    variable "Date" and the Date variable is used in all task of

    the packages based on that date the data is been transferred ..

    now how to assign the values to the variable after executing the

    sp...

    Help me...

  • Use an Execute SQL Task for your stored procedure and assign the output to your variable

  • Can you explain what you are doing with the variable? Are you using it as a static start date variable for the package? Are you populating using a function like GETDATE()? If either of those are true there are ways to get that functionality without a round-trip to the database.

  • You can populate a date output parameter using the Execute SQL Task by setting the variables in the result set. The first column, Result Name, type 0 (the number zero) and the second select the variable you want to populate from the drop down list.

    I'd attach a photo but I'm having some trouble figuring out how that is done.

  • Thank you for the responses ..

    it really helped me ...

  • One simple way is Mark IsStoredProcedure flag to '1'

    Execute the stored procedure same as you do in Query Analyzer in Sql Server 2008

Viewing 6 posts - 1 through 5 (of 5 total)

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