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

DTSGlobalVariables Expand / Collapse
Author
Message
Posted Monday, August 16, 2004 10:34 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, October 22, 2004 8:42 AM
Points: 8, Visits: 1
hi,
how can i to use the DTSGlobalVariables on Sql scripts?
I mean, i'm using a Dts with a date variable and I must to modify everytime when is necessary in all the scripts on Dts.
By the other hand, this date isn't the current date always, so i'm a little bit complicated.

Thanks a lot.

Sorry my english
Post #132070
Posted Tuesday, August 17, 2004 12:49 AM


SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Wednesday, July 23, 2014 8:51 AM
Points: 265, Visits: 703
Step 1: Drag and Drop the Dynamic properties in the designer

Step 2: Right click on the Designer window - > Click Package Properties -> Global Variables
i. Add Name,Type and value

Step 3: Double click the Dynamic properties which you have dragged and dropped initially. You will see
Destination Property, Source Type, Source Value
Click Add button. Go to Global Variables (where in you will see the variable you have created)

Select it and click set. YOu will see a window with a combo box source type. Select Global Variable. Then you will see the global variable you have added and finally click ok.

Double click the transformation: You will see the query something like this. Select * from customers where cust_id = ?
Click parameters and add the corresponding global variable

VIP: Make sure the dynamic properties is the first step executed in your package.


Thanks,
Ganesh

Have a nice day, unless you have other plans.






Post #132176
Posted Tuesday, August 17, 2004 9:03 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, October 22, 2004 8:42 AM
Points: 8, Visits: 1
thanks 4 your answer, but i still having the problem 'cause i have sql server 7 and aparently the Dynamic doesn't exist in this version.
have u another solution about this topic??

thanks again

sl3
Post #132302
Posted Tuesday, August 17, 2004 9:04 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: Friday, July 25, 2014 2:49 PM
Points: 804, Visits: 1,989

You only need to use the dynamic properties if you are using the global variable to change the property of one or more object items.  For example, if a global variable is used to determine an input or output file name, you would need the dynamic properties step to change the file name of the file.

In this case, however, it seems as if it can be a parameter to an SQL task.  I would set the GV in an active X script task (use the browser to make it easy), and then append the parameter as described above.




Post #132304
Posted Tuesday, August 17, 2004 9:09 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, October 22, 2004 8:42 AM
Points: 8, Visits: 1
thanks, but i need to use the parameters on a sql script.
For Example: select * from table where fieldvalue = dtsglobalvar

do u understand?

thanks.

sl3
Post #132306
Posted Tuesday, August 17, 2004 9:12 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: Friday, July 25, 2014 2:49 PM
Points: 804, Visits: 1,989

Yes, I understand.

As I indicated already, you need to follow the procedures listed by the previous answer to use a ? and attach that property to the global variable.

I do not know if this feature is not available on V7.  You will have to detm this yourself.




Post #132308
Posted Tuesday, August 17, 2004 9:14 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, October 22, 2004 8:42 AM
Points: 8, Visits: 1
this option isn't available on mi version.
so i'm looking 4 another solution.

thanks

sl3
Post #132310
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse