Solved

Changing values of Variables in SSIS

Posted on 2011-02-22
3
191 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Recently, Microsoft released a best-practice guide for securing Active Directory. It's a whopping 300+ pages long. Those of us tasked with securing our company’s databases and systems would, ideally, have time to devote to learning the ins and outs…
Your data is at risk. Probably more today that at any other time in history. There are simply more people with more access to the Web with bad intentions.
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…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…

689 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