Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Set default values for variables in SSIS

Posted on 2008-10-30
8
Medium Priority
?
740 Views
Last Modified: 2013-11-10
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
0
Comment
Question by:allanmark
[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
  • 4
  • 3
8 Comments
 
LVL 22

Accepted Solution

by:
PedroCGD earned 500 total points
ID: 22841967
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
 
LVL 22

Expert Comment

by:PedroCGD
ID: 22842003
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
 
LVL 17

Expert Comment

by:HoggZilla
ID: 22842036
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
Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

 
LVL 17

Assisted Solution

by:HoggZilla
HoggZilla earned 500 total points
ID: 22846967
OK, the HoggZilla document is done. Enjoy.
Populating Variables in SSIS

SSIS-Populate-Variable.pdf
0
 
LVL 22

Expert Comment

by:PedroCGD
ID: 22848967
Very good HoggZilla!!
Cheers!!!
0
 
LVL 17

Expert Comment

by:HoggZilla
ID: 22848983
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
 
LVL 22

Expert Comment

by:PedroCGD
ID: 22848994
Yes! I will do that! :-)
Regards!
Pedro
0
 

Author Closing Comment

by:allanmark
ID: 31511699
Many thanks!  Really excellent support - it has been a great help!!
0

Featured Post

Does Your Cloud Backup Use Blockchain Technology?

Blockchain technology has already revolutionized finance thanks to Bitcoin. Now it's disrupting other areas, including the realm of data protection. Learn how blockchain is now being used to authenticate backup files and keep them safe from hackers.

Question has a verified solution.

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

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
When trying to connect from SSMS v17.x to a SQL Server Integration Services 2016 instance or previous version, you get the error “Connecting to the Integration Services service on the computer failed with the following error: 'The specified service …
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Viewers will learn how the fundamental information of how to create a table.

730 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