Assigning a Value to a Package Variable

  • Hello Everyone

    Try not too laugh too loud

    I know this is simple, but I cannot seem to gather my thoughts to figure this out.

    I am select a number from a table, and I want to assign that resultset to a SSIS Package Variable. How would I do this, or what object would I use?

    Thank You in advance

    Andrew SQLDBA

  • I am select a number from a table, and I want to assign that resultset to a SSIS Package Variable. How would I do this, or what object would I use?

    Andrew SQLDBA

    I would use "Execute sql task" and select "single row" or "full resultset" based on whether you would select only one row or all rows in the table. Then, in "Result Set" tab, map the Result name to 0 and variable name to the user variable which you have created in SSIS. That variable needs to be of type "object".

    [font="Arial"]BASKAR BV
    http://geekswithblogs.net/baskibv/Default.aspx
    In life, as in football, you won’t go far unless you know where the goalposts are.[/font]

  • Perfect

    Thank you so much.

    For some things, DTS was much easier. But I love SSIS so much better.

    Andrew SQLDBA

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

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