Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 Load Text Files from local directory - dynamic

Author  Topic 

daniella415
Starting Member

2 Posts

Posted - 2005-05-20 : 16:18:31
I'm doing a pull from one SS db to another. On the Source db there is a table that has a list of files that need to be loaded into the target db with a status of loaded or not loaded. This table gets updated constantly with new files - but they all have the same target and all the files are in the same directory.

How could I use DTS to use that table to pull the files that it needs since it won't alway be the same file name?

Thanks!!!

nr
SQLTeam MVY

12543 Posts

Posted - 2005-05-21 : 08:57:52
Why use dts - not usually a good product for dealing with text files.
See
http://www.mindsdoor.net/SQLTsql/ImportTextFiles.html
That will import all files in a directory but if you want to just import those that are held in a table then use the @FileNameMask as the filename.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -