Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL DTS Import

Status
Not open for further replies.

jepatte

Programmer
Jul 4, 2005
75
US
I need to create a package that imports a text file into a table. Here's the trick...I need it to be dynamic so that one day, I can read 001.txt and the next day, 002.txt, so on. I will do this by reading a table. I'm just not sure if I can create a package that does this.
 
You will need to look into using global variables combined with either dynamic properties tasks or activeX script tasks set up to modify your source file names.

Does your table (to be used in determining file names) just house the file names that have been loaded?

This type of task is easiest with file names containing the date, but I think your setup will work.

Hope this helps to get you started,

Alex

A wise man once said
"The only thing normal about database guys is their tables".
 
Your setup will work fine. You will need to use the dynamic properties task to change the file name of the file that you are going to be loading before starting the load.

Basically do the dynamic properties task, then the load with a on successful between the dyanmic properties task and the source file conenction object.

Denny
MCSA (2003) / MCDBA (SQL 2000) / MCTS (SQL 2005) / MCITP Database Administrator (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top