Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

DTS package to append query results in a text file

Posted on 2004-11-09
1
Medium Priority
?
1,149 Views
Last Modified: 2010-08-05
I have a DTS package that takes the results of a query and writes them to a text file. The problem I have is that each time the package runs, it overwrites the text file; I would like it to append the new results to the text file.

The current DTS package has 3 elements, the connection to my server, a data transform task, and the connection to the destination text file. I see no properties of the transformation that allow me to select an 'append' option'.

Thanks for any help.
0
Comment
Question by:hlevine5
1 Comment
 
LVL 32

Accepted Solution

by:
Brendt Hess earned 1000 total points
ID: 12536187
I just condicted a test, and worked out a way to do this.  It involves adding one more step to the process.

With your current process, direct the output to an interim/working file, not the final destination.
Create a .BAT file with a command similar to this one:

Type WorkFile.Txt >> DataFile.txt

Place this in the working directory where you have the text files

Add an execute process task to execute the .BAT file.  This will append the output to the final text file.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

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…
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
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.
Suggested Courses

581 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