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)
 Import excel files

Author  Topic 

GranadaDude
Starting Member

1 Post

Posted - 2007-09-24 : 09:57:48
Hello everyone,

I have a question on how to deal with this problem...

I have a production database with recipes, this is a SQL Server 2000 database.

This database holds a number of orders.

The planning system from my client is used to generate several excel files.

Inside these excel files the new orders need to be imported into my SQL Server database.

Now, before I can start a DTS package to import the data into my SQL tables, I need to check a few things:

Only when the number of orders in my SQL Server table is getting below 100, the DTS package should be carried out to read the next available excel file.

So, there's a list of generated excel files, and the filename also changes. Eg RA000010.xls, RB000020.xls, RA000015.xls, etc...

I need to check the filename if it's data for line A or B based on the second character. Also, I need to obtain a list of excel files in a directory, so I can get the right excel file with the lowest number. Then I can import the data into the SQL table and move the processed file to another location.

Any suggestions how to achieve this goal ? Is it possible to do all this within SQL Server 2000 ?

Please advice,

Regards,

Tom
   

- Advertisement -