SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


How to replace a local Variable in SSIS package by Variable declared in Configuration Package?


How to replace a local Variable in SSIS package by Variable declared in Configuration Package?

Author
Message
metoseeu
metoseeu
Valued Member
Valued Member (74 reputation)Valued Member (74 reputation)Valued Member (74 reputation)Valued Member (74 reputation)Valued Member (74 reputation)Valued Member (74 reputation)Valued Member (74 reputation)Valued Member (74 reputation)

Group: General Forum Members
Points: 74 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.
Crispin Proctor
Crispin Proctor
SSCrazy
SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)

Group: General Forum Members
Points: 2037 Visits: 414
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!
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search