Set default values for variables in SSIS

Greetings all

I ma using a couple of variables in my package and need to know how best to set the default values.

Any thoughts?


In advance, thanks!!!

allanmark
allanmarkAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

PedroCGDCommented:
You could use Package Configurations to do that.
Check this link:
http://www.sqlis.com/post/Easy-Package-Configuration.aspx

I usually store values in XML config file and SQL Database.
Helped?
Need more help?!
Regards!
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
PedroCGDCommented:
Also see this:
http://www.sqljunkies.com/WebLog/knight_reign/archive/2004/12/07/5445.aspx

If you are a beginner I can create a SSIS package to you! Let me know if you have more doubts!
Pedro

www.pedrocgd.blogspot.com
0
HoggZillaCommented:
Best way to set the default values, in other words, the values from the beginning is to type the value into the "Value" column in the Variables window.
If you need to set the variable at runtime dynamically, I suggest any of these ways.
1. Use an Execute SQL Task to get the value from a database, the columns returned in the Select can be put into variables. See the Result Set window in the editor of the SQL Task. Pic below.
2. Use an expression to define the value of the variable. With the variable selected, go to the Properties window and set the EvaluateAsExpression to True, then write an expression to populate the value.
3. Get the value of the variable from a file. I can provide instructions for this if you like.
Does this help?
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

HoggZillaCommented:
OK, the HoggZilla document is done. Enjoy.
Populating Variables in SSIS

SSIS-Populate-Variable.pdf
0
PedroCGDCommented:
Very good HoggZilla!!
Cheers!!!
0
HoggZillaCommented:
Thanks Pedro! Have a great day today and let's help some people. My email is in that doc, contact me if you like.
0
PedroCGDCommented:
Yes! I will do that! :-)
Regards!
Pedro
0
allanmarkAuthor Commented:
Many thanks!  Really excellent support - it has been a great help!!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.