I have a DTS package where I'm using a Global Variable in the where clause of the query for retrieving a record from the source. How can I call this from a sproc and pass in a value for the global variable?
I ended up clicking start/Run and pasted the following in "dtsrunui" and clicked OK. First select the server where your DTS packages is. This option is in the lower half, it says "Server". Then select the package name from the top button with the ellipse. Then click on Advanced. Type in the name of the global variable you created in the text box up top. Then Click the Generate Button. The grayed out text box next to the "generate" button will contain the string you need to place behind the following statement inside you sproc:
exec master..xp_cmdshell 'Your string'
be sure to enclose the string inside single quotes.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.