Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

use global variables Expand / Collapse
Author
Message
Posted Tuesday, October 14, 2008 7:24 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, November 18, 2008 4:30 AM
Points: 1, Visits: 35
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.
Post #585436
Posted Tuesday, October 21, 2008 11:03 AM
SSChasing Mays

SSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing Mays

Group: General Forum Members
Last Login: Friday, August 31, 2012 10:31 AM
Points: 633, Visits: 1,695
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.
Post #589315
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse