Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server DTS
|
SQL Server DTS Discussion specific to Data Transformation Service with SQL Server. General SQL Server discussions should use the general SQL Server forum. Readers of the book Professional SQL Server 2000 DTS with questions specific to that book should post in that book forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server DTS section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 27th, 2006, 02:59 PM
Registered User
 
Join Date: Mar 2004
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default How do I use a global var as an output file name

Hi,
   this is probably been asked many times but i see it in the forum.
I need to create a DTS package that is run from a stored procedure.
Basically the package dumps data to a .CSV, and needs three parameters: start date, end date and output file Path(and file name).
I ve set up all three as global variables, and have no problem with getting the dates into the SQL statement. However I can't get the file name to change.
   I found some questions the referred to dynamics, in DTS,
   Can any one hep with this, or refer me to a good source.
Thanks
Peter

 
Old April 27th, 2006, 03:16 PM
Registered User
 
Join Date: Mar 2004
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default


I think I just answered my own question, I should have been looking at the parameters of the connection, not the pump task, in the dynamic tasks.
     This is what happens trying to find the answers in the help rather than just playing around with the designer......
thanks
Peter

 
Old May 5th, 2006, 03:34 AM
Friend of Wrox
 
Join Date: Dec 2005
Posts: 146
Thanks: 0
Thanked 1 Time in 1 Post
Default

I presume you are calling or job or more likely using xp_cmdshell 'dtsrun.exe /N' to launch the package.
By passing in the Global variables to dtsrun.exe using the /A option you can overwrite the values. Then use a dynamic properties task to alter the connection object passed on the Global variable.

For more info see: http://www.mutuallybeneficial.com/in...s_portable.htm

David Lundell
Principal Consultant and Trainer
www.mutuallybeneficial.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with PHP file reading XML file for output rydog65 Beginning PHP 0 March 26th, 2008 05:13 PM
Using a var into the name of another var or field. guizero Access VBA 3 May 30th, 2006 03:47 PM
accessing an XML file with Filename in a var c# Jkelly BOOK: Professional Crystal Reports for VS.NET 0 August 16th, 2004 04:00 AM
Setting output of Execute command to a @var andydorman SQL Server 2000 1 April 8th, 2004 10:01 PM
Multiple file input single file output.... jdm_mboy Biztalk 1 July 2nd, 2003 03:35 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.