We help IT Professionals succeed at work.
Troubleshooting Question

In SSIS 2017, how to change a variable value without using a script task because no coding is allowed

paultran00
paultran00 asked
on
19 Views
Last Modified: 2020-08-15
In SSIS 2017, how do I change a variable value without using a script task because no coding is allowed.

Example:
I have some variables defined:  
vEnvironment = "DEV"
vEmailTo =  "Mary@company.com"


I want to dynamically change the value of vEmailTo based on vEnvironment.

So if vEnvironment = "PROD" then use the variable vEmailTo with its default value (send to Mary).

If vEnvironment != "PROD" then I want to change the value of vEmailTo =John@mycompany.com.
Comment
Watch Question

Máté FarkasSQL Server Consultant
CERTIFIED EXPERT

Commented:
It is better to create some environment set for you SSIS package and in each environment you can set the value of these variable.
This means that you can use exactly the same package in test and prod environment. In production you should have a PROD environment set and on test system you can create a TEST environment set. But if you don't define an environment set for the package the default values will be used.
Get access with a 7-day free trial.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.