replace old files when import | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

replace old files when import

hi I am new to sql server
I have about 150 .txt files everyday. I schedule DTS to import these files everyday.
but I want it to replace old files. because each day it append new records to new table.
is there any way to delete old file Another issue is when I try to schedule it ask to start sqlserveragent.
I made it automatic. But when it starts a windows pop up that shows sqlserveragent started in dos command menu. any idea thanks in advance
How have you created the DTS package? If through EM then there is an option in the GUI to replace data rather than append. Where are you trying to schedule the task from? and how? what command line are you trying to run? Cheers
Twan
You can do with activex script and for code examples may search underhttp://www.sqldts.com. For the second issue under Control panel –> Services for MSSQLAgent remove tick mark for ‘Allow service to Interact with desktop’ and it will solve the problem of opening dos window. Satya SKJ
Moderator
http://www.SQL-Server-Performance.Com/forum
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
I am trying in EM
in any database from menu all task->import
I havent seen any option in GUI like append or replace
Could you please tell me which menu should I use thanks in advance
The place where you specify the destination table should have a button next to it marked … This is the transformation button, this takes you to a screen when you can set the task to drop/create the table, delete all data from the table or append Cheers
Twan
]]>