• put the SQL you want to execute into a stored procedure.

    In the DTS Execute SQL step put something like:

    EXEC mystoredprocedure @myglobalvar = ?

    Then hit the "Parameters" button. Select the global variable you want to put in the parameter.

    For some reason, the Execute SQL steps will only see the parameter marker (a question mark) when you are executing a sproc.

    I wish it was easier!


    Julian Kuiters
    juliankuiters.id.au