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