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!

Change Multiple instances of File Destination in DTS 1

Status
Not open for further replies.

Crazyshoes

Programmer
Jan 13, 2005
2
CA
I have a DTS package that exports data to a text file from various tables in a database. I need to go in and change the destination of each of the files. Is there a way to change the destination path of each export file without having to change each one individually? Thanks.
 
not that I know of - if you had coded the destination in using variables then I guess you could then have just chenged the variable and it would then be changed in all the tasks but that doesnt sound like the case so it looks like a change to them all individually.

[bandito] [blue]DBomrrsm[/blue] [bandito]
 
Yes I didn't think it was possible. Do you have any sample code to show how I would set the destination using a variable. If you don't no problem. Thanks again.
 
Code:
declare @myfilename varchar (50)
declare @SQL varchar (200)
SET @myfilename = 'mynewfilename.txt'
set @SQL = 'whatever the rest of the string is that makes up the path '+@myfilename
--EXEC (@SQL)
PRINT @SQL[code]

Play around with this - whan you get it to work in you problem you would only have to reset the value of @myfilename.

[bandito] [blue]DBomrrsm[/blue] [bandito]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top