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


DTSGlobalVariables


DTSGlobalVariables

Author
Message
disagree
disagree
SSC-Enthusiastic
SSC-Enthusiastic (102 reputation)SSC-Enthusiastic (102 reputation)SSC-Enthusiastic (102 reputation)SSC-Enthusiastic (102 reputation)SSC-Enthusiastic (102 reputation)SSC-Enthusiastic (102 reputation)SSC-Enthusiastic (102 reputation)SSC-Enthusiastic (102 reputation)

Group: General Forum Members
Points: 102 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
babuganesh2000
babuganesh2000
SSC Eights!
SSC Eights! (998 reputation)SSC Eights! (998 reputation)SSC Eights! (998 reputation)SSC Eights! (998 reputation)SSC Eights! (998 reputation)SSC Eights! (998 reputation)SSC Eights! (998 reputation)SSC Eights! (998 reputation)

Group: General Forum Members
Points: 998 Visits: 801
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.



disagree
disagree
SSC-Enthusiastic
SSC-Enthusiastic (102 reputation)SSC-Enthusiastic (102 reputation)SSC-Enthusiastic (102 reputation)SSC-Enthusiastic (102 reputation)SSC-Enthusiastic (102 reputation)SSC-Enthusiastic (102 reputation)SSC-Enthusiastic (102 reputation)SSC-Enthusiastic (102 reputation)

Group: General Forum Members
Points: 102 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
RonKyle
RonKyle
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10693 Visits: 3695

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.





disagree
disagree
SSC-Enthusiastic
SSC-Enthusiastic (102 reputation)SSC-Enthusiastic (102 reputation)SSC-Enthusiastic (102 reputation)SSC-Enthusiastic (102 reputation)SSC-Enthusiastic (102 reputation)SSC-Enthusiastic (102 reputation)SSC-Enthusiastic (102 reputation)SSC-Enthusiastic (102 reputation)

Group: General Forum Members
Points: 102 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
RonKyle
RonKyle
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10693 Visits: 3695

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.





disagree
disagree
SSC-Enthusiastic
SSC-Enthusiastic (102 reputation)SSC-Enthusiastic (102 reputation)SSC-Enthusiastic (102 reputation)SSC-Enthusiastic (102 reputation)SSC-Enthusiastic (102 reputation)SSC-Enthusiastic (102 reputation)SSC-Enthusiastic (102 reputation)SSC-Enthusiastic (102 reputation)

Group: General Forum Members
Points: 102 Visits: 1
this option isn't available on mi version.
so i'm looking 4 another solution.

thanks

sl3
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