Solved

dts to excel file that incoroprates date in name

Posted on 2008-10-08
4
275 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
I have a large data set and a SSIS package. How can I load this file in multi threading?
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Viewers will learn how the fundamental information of how to create a table.
Suggested Courses

627 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