use global variables

  • hey,

    I have a DTSGlobalVariables and i would like to insert a value from an "execute SQL task" in a DTS with a function which I made.........how to do it?

    thanks in advance.

  • Do you want to populate a Global Variable with the result of an Execute SQL Task or do you want to use a Global Variable as a parameter in the Execute SQL Task?

    To populate the Global Variable, open your Execute SQL Task and click on the Parameters button. Go to the OutputParameters tab, select the Rowset radio button and select your Global Variable from the drop-down list. Click OK twice and execute the SQL task to populate the variable.

    To use the Global Variable as a parameter, open your Execute SQL Task and replace the part of the SQL statement you want to paramterize with a question mark (?).

    For example: SELECT * FROM dbo.Employees (NOLOCK) WHERE LastName = ?

    Click on the Parameters button. Go to the InputParameters tab and select your Global Variable from the drop-down box.

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

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