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)
 Importing all files in a folder

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2003-09-05 : 07:57:02
Chris writes "Windows 2000 Professional + SQL Server 2000 (standalone version)

The only answer I have been able to find from a link on your site is too technical for me...but I have read the FAQ's.

As a relative newcomer to SQL Server, I have managed to work out how to import a text file to a pre-made empty table and then to adjust the saved DTS package so as to append subsequent files held in the same source folder. However, my source folders contain up to 200 identically structured text tables and re-setting the DTS package by hand to append each is very time-consuming (and increases the chance of manual error).

Is there a technically straightforward way to tell the DTS package to loop through all files in a folder, appending each to the same pre-defined table, and then stopping at the end?

Let me repeat that I don't understand the reams of code on the 'DTS Only' page that I reached from your site. If it's a question of writing code, I am happy to try but I need to be told where to write it!

Thanks."

robvolk
Most Valuable Yak

15732 Posts

Posted - 2003-09-05 : 07:57:54
DTS is probably not the best way to do this, give BULK INSERT a try:

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=24371
Go to Top of Page
   

- Advertisement -