Solved

Changing values of Variables in SSIS

Posted on 2011-02-22
3
188 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:lynanee
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 142

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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
powershell code to list items in dropdown 6 64
How to search for strings inside db views 4 27
Find results from sql within a time span 11 30
SQL Query assistance 16 23
Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
Shadow IT is coming out of the shadows as more businesses are choosing cloud-based applications. It is now a multi-cloud world for most organizations. Simultaneously, most businesses have yet to consolidate with one cloud provider or define an offic…
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…

770 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