Solved

dts to excel file that incoroprates date in name

Posted on 2008-10-08
4
265 Views
Last Modified: 2013-12-25
I'm trying to use MSSQL 2000 DTS to query a database and save the results in a local file. That file just needs to have a unique file name. So I just want to use the date in the file name. Since I have no experience with VB in DTS, I just want to do a save as in the DTS.

Norman.
0
Comment
Question by:mmandrax
4 Comments
 
LVL 75

Accepted Solution

by:
Anthony Perkins earned 25 total points
ID: 22675576
See here:
How can I change the filename for a text file connection?
http://www.sqldts.com/200.aspx
0
 
LVL 31

Assisted Solution

by:James Murrell
James Murrell earned 25 total points
ID: 22694484
i use a batch file to change the name after the file is created

something like

@echo off
set thedate=%date% %time%
ECHO %thedate%
set yyyy=%thedate:~10,4%
set mm=%thedate:~4,2%
set dd=%thedate:~7,2%
set hh=%thedate:~15,2%
set mi=%thedate:~18,2%
copy filename.csv filename_%yyyy%%mm%%dd%%hh%%mi%.csv

0

Featured Post

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now