Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

How to replace a local Variable in SSIS package by Variable declared in Configuration Package? Expand / Collapse
Author
Message
Posted Wednesday, August 13, 2008 3:26 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Thursday, February 11, 2010 5:47 AM
Points: 24, Visits: 150
Hi

I have a local variable x - datetime (Ex 01/01/2008) in my SSIS script. I have two connection manager in the same script. I have binded the Scripts to Package Configurations.

Now in the Package Configurations , I have defined the variable x as -05/05/2008 , but however at run time, SSIS picks up the local value of 01/01/2008.

How to bind the package configuration value x to local variable x ?

I tried to pass this through the Expressions in Properties window, but failed.

Help out.
Post #551698
Posted Wednesday, August 13, 2008 4:03 AM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Monday, July 14, 2014 3:32 PM
Points: 917, Visits: 412
What makes you say the value has not changed? Do you add a watch window or using a script task, msgbox it?

If you have a variable you want to set with configuration, it is simple.
1) Create variable
2) Menu > SSIS > Package COnfiguration
3) Add new
4) Enter a filename, click next.
5) Find the variable in the tree and select Value. (Ensure the checkbox is checked)

That is it.
Now edit the config file with notepad to change the value if you want to.

Remember, the value you see in the variable pane at runtime is not the true value of the variable. The variable pane is a designtime thing.





Cheers,
Crispin


I can't die, there are too many people who still have to meet me!

It's not a bug, SQL just misunderstood me!
Post #551717
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse