Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


use global variables


use global variables

Author
Message
gizeya
gizeya
Forum Newbie
Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: General Forum Members
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.
Erik Kutzler
Erik  Kutzler
SSChasing Mays
SSChasing Mays (639 reputation)SSChasing Mays (639 reputation)SSChasing Mays (639 reputation)SSChasing Mays (639 reputation)SSChasing Mays (639 reputation)SSChasing Mays (639 reputation)SSChasing Mays (639 reputation)SSChasing Mays (639 reputation)

Group: General Forum Members
Points: 639 Visits: 1697
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.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search