Depends really, probably the most important thing is how to calculate the
correct date/month etc. The crux of the matter, though, is to use a
VBScript task to create the text string for the filename, and post that to a
DTSGlobalVariable. You then use that variuable in Execute SQL task
(assuming you are using SQLServer2K).
-----Original Message-----
From: Beal, Jeremy [mailto:[Email Address Removed] 30 July 2003 17:57
To: LazyDBA.com Discussion
Subject: Importing Text File DTS question
Hello fellow DBA's,
Lets hope this makes sense.
I am using a DTS Package that I created.
I am using an Execute Sql Task. Within this I am simply deleting records for
the current month.
Upon success, then I am importing using Text File (source). Within this, it
has a form whose properties have the filename, and various settings to
import the file. Basically I am appending data from a text file to a table
whose records were deleted for the current month.
Problem: Is there another way to import text file programmatically. The text
file (source) has the fixed name of the text file. I would like to be able
to change the file name thru code. Lets say it is august, i would like the
code to look for a filename for august, instead of july. I need it to be
done automatically without manual editing the DTS package.
Regards,
Jeremy Beal
Shamrock Materials Inc.
---------------------------------------------------------------------
TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To unsubscribe, e-mail: mssqldba-[Email Address Removed] additional commands, e-mail: mssqldba-[Email Address Removed]MS Sql Server LazyDBA home page