DTS Global Variables

  • Hello,

    Is it possible to pass in a value from the global parameters into an Execute SQL task?  If so, how?  Basically, I need to execute a query based on the value in the dts global variables section, which this package will be executed using dtsrun or the DTS library.

    Thanks,

    Brian

  • Place your SQL statement as normal, but where you want to use the global variable use the following:  (?)

     

    For example:  select * from

    where id=(?)

    Then select the "parameters" button and assign the global variable by parameter.  This will go in order if you have more than one global variable to assign in your sql statement.

  • Excellent.  Thanks a lot.

Viewing 3 posts - 1 through 2 (of 2 total)

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