Solved

dts to excel file that incoroprates date in name

Posted on 2008-10-08
4
269 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
push and Pull replication 31 47
Need help with a query 3 39
Searching a barcode number within a string. 7 25
SQL syntax question 6 39
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
I have a large data set and a SSIS package. How can I load this file in multi threading?
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.
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…

749 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