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)
 DTS and Wildcard Filenames

Author  Topic 

billsack
Starting Member

35 Posts

Posted - 2006-09-22 : 10:09:38
Hi folks,

I have a heap of files coming in every day via FTP. I have a decent client that pulls these down and deletes the originals, leaving them in a directory ready to import into SQL.

The problem is that they always have different filenames. Because of this I cannot get the DTS to pick up the newest files.

Can anyone help please. I am really stuck.

Cheers

nr
SQLTeam MVY

12543 Posts

Posted - 2006-09-22 : 12:37:38
You can rename/copy the files to a known filename.
But why use dts. If you use bulk insert then you don't have any problem.
see
http://www.nigelrivett.net/SQLTsql/ImportTextFiles.html

And while you're at it why not do the ftp from t-sql and keep everything in the same language
http://www.nigelrivett.net/FTP/s_ftp_GetDir.html
http://www.nigelrivett.net/FTP/s_ftp_GetFile.html


==========================================
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 -