Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pass Parameter to DTS Execute SQL Task

Status
Not open for further replies.

SQLBI

IS-IT--Management
Jul 25, 2003
988
GB
Hi,

I'm a bit of a DTS newbie and i've been struggling with this all day now...

I have a DTS task which outputs the contents of a table to a .txt file, i've had to use DTS as i need the column headings as the .txt file is used for an MS Word mail merge.

What i want to do is add a WHERE clause to my SQL statement to only select records from a specific site. I know i'm going to have to use xp_cmdshell and dtsrun via an SP, but how do i pass and accept the variable within the DTS task.

Any help would be appreciated.

Cheers,
Leigh

The problem with common sense is that it isn't that common!
 
Code:
dtsrun /Sserver_name /E /Npackage_name /Aglobal_variable_a:type_code=value /AdateEnd:8=2006-03-31

Create global variables and use them in the package. Run the package as shown to assign a different value to the global variable at run time.

See Books Online topic dtsrun utility.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top