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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Text File Export Name

Status
Not open for further replies.

NEveritt

MIS
Dec 30, 2002
25
GB
Is there a quick way to have a DTS export running every day, but not wipe over the file it creates? I.e. to add a date parameter to the file name.

Your help is appreciated, Im new to this.

N
 
I believe you can do it in SQL 2k with a Dynamic Properties Task, I havent used this as we are still on SQL Server 7, though we get round it by having an execute SQL task run on success of the file export by using xp_cmdshell, it works ok though I know a lot of people have xp_cmdshell restricted

this is the example we use

declare @renameexp varchar(200)
select @renameexp = 'rename \\server\share\export' +' export'+replace(convert(varchar,getdate(),3),'/','')+'.csv'
exec master..xp_cmdshell @renameexp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top