Solved

Changing values of Variables in SSIS

Posted on 2011-02-22
3
189 Views
Last Modified: 2012-05-11
Please what can I do to change the initial values of a variable when a SQL server agent job is run. For example I am running the job from year 2001 to 2010. I have created variables called var_start_year and var_end_year that have their values defaulted to 2001 and 2010 and I would like to know how to change the values before the job is run from the server

Thanks
0
Comment
Question by:Lyn Udy
3 Comments
 
LVL 15

Accepted Solution

by:
derekkromm earned 500 total points
ID: 34957652
A couple of options:

1) setup a package configuration (in BIDS, go to SSIS, Package Configuration), and allow for the configuration of the desired variables
2) when executing the package from the GUI, go to the "Set Values" section, and specify the variables and values
3) when executing with a command line, specify the following: /set "\package.variables[var_start_year].Value";2001 /set "\package.variables[var_end_year].Value";2010

The configuration for any of these should all be similar. If you need extra details, let me know.
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 36119848
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
I annotated my article on ransomware somewhat extensively, but I keep adding new references and wanted to put a link to the reference library.  Despite all the reference tools I have on hand, it was not easy to find a way to do this easily. I finall…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question