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
 General SQL Server Forums
 New to SQL Server Programming
 Import excell data to SQL 2000?

Author  Topic 

GB
Starting Member

22 Posts

Posted - 2005-09-19 : 12:11:09
I need to import data in several hunderd excell spreadsheets to a sql 2000 table. What function should I use? Do I need to create a table in sql with the same columns as the excell file and then run a query? Iam pretty new to sql, so please be gentle

Thrasymachus
Constraint Violating Yak Guru

483 Posts

Posted - 2005-09-19 : 12:20:24
read about data transformation services. a few years back I wrote a little program that cycled through all of the files in a directory and renamed them to standarad file name. the dts package was triggered by a loop in the application and pulled all of the files into a staging table (that did exist previously). Then there were some data scrubbing queries and then I did an INSERT INTO the final destination. If I still have the code it is at home and if I can find it I will post the important parts tonigh.

====================================================
Regards,
Sean Roussy

"pimpin ain't easy, but someone has to do it" -- Pimpin Whitefolks(?)
Go to Top of Page

GB
Starting Member

22 Posts

Posted - 2005-09-19 : 12:29:19
That would be awesome if you could post the important parts. This would be a one time operation if that has any relevance....
Thanks
Go to Top of Page

sachinsamuel
Constraint Violating Yak Guru

383 Posts

Posted - 2005-09-19 : 12:36:05

Hi,

Apart from this,

You can also create visual basic .bas file from DTS while importing the excel file thru sql server. Include this .bas file in ur code (VB, VB.NET) and can use it with some small changes.

Regards
Sachin
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-09-20 : 00:38:44
GB, do you need something like this?
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=49926

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -