×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Call DTS from Sproc and pass in a global variable

Call DTS from Sproc and pass in a global variable

Call DTS from Sproc and pass in a global variable

(OP)
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?

RE: Call DTS from Sproc and pass in a global variable

(OP)
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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close