DTSGlobalVariables

  • 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

  • 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.

  • 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

  • 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.

  • 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

  • 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.

  • this option isn't available on mi version.

    so i'm looking 4 another solution.

    thanks

    sl3

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply