Change variable scope

  • Hi Guys,

     

    Can anyone tell me how to change the scope of my variable in SSIS without having to recreate it?

    In the variable window the scope field of the grid is not editable.

    Thanks

  • It has been reported on the SSIS forum on MSDN as has the script window is modal. We have to wait for a service pack or the next release.

  • Close ur VS and then Setup BIDS Helper after you download it from:

    http://www.codeplex.com/bidshelper/Wiki/View.aspx?title=Variables%20Window%20Extensions&referringTitle=Home

    Note: You'll find the Download link in the upper-right corner of the page

    Good luck

  • Mate, that won't work. Through BIDS Helper all you can change is a variable's NAMESPACE, not SCOPE.

  • Without some extra tools (which I can't name) it isn't possible. Unless you created a lot of variables that are scoped wrong this is really just an inconvenience. Sorry man..

    CEWII

  • Note this is a 5 year old thread. 😀

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/

  • Ah, excellent point.. But the answer is still the same..

    CEWII

  • Maybe in another five years, the answer will instead be "select the desired value from the scope dropdown menu from within the variable's properties" 🙂

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

  • I actually found that you can change scope by moving the variables in the XML based code file. It's a bit complicated, but if I have time I'll write up a "how to" and post here.

    Just "View Code" and find where your variables are currently located, and move them next to a variable that's currently in the scope that you want.

  • Phil Parkin (10/4/2011)


    Maybe in another five years, the answer will instead be "select the desired value from the scope dropdown menu from within the variable's properties" 🙂

    Luckily, you won't have to wait five years 🙂

    This feature is available in Denali. (see screenshot in attachment)

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

  • Oooooooh, cool!! Maybe in five years we might have actually migrated to Denali 🙂

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

  • kypizzle (10/5/2011)


    I actually found that you can change scope by moving the variables in the XML based code file. It's a bit complicated, but if I have time I'll write up a "how to" and post here.

    Just "View Code" and find where your variables are currently located, and move them next to a variable that's currently in the scope that you want.

    I've had a few packages where I wanted to change the scope of the variable. Thanks for the help, this works. Very silly from M$ not to include this in SQL 2008 as yet. And hopefully in Denali, the auto Layout will also be sorted out. It never does the layouts properly :angry:

Viewing 12 posts - 1 through 11 (of 11 total)

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