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 CSV files to SQL 2000?

Author  Topic 

GB
Starting Member

22 Posts

Posted - 2005-08-25 : 15:03:21
I have several hundred .csv files that have a specific cell that I need to get into a SQL table.
These files are named after the date on which they were created...ie 8252005 would be todays date.
Im looking for a way to import this cell to SQL... the same cell in each file....
Thanks for any help

X002548
Not Just a Number

15586 Posts

Posted - 2005-08-25 : 15:10:35
There's a couple of ways...I'd use bcp inside a sproc

Look here

http://weblogs.sqlteam.com/brettk/archive/2005/06/28/6895.aspx

And here

http://weblogs.sqlteam.com/brettk/archive/2005/06/30/6907.aspx

as a start



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx
Go to Top of Page

GB
Starting Member

22 Posts

Posted - 2005-08-25 : 15:38:48
Well Im obviously clueless.....both of those seem to refer to a different procedure.
My directory containing these files is
c:\Boiler Steamflow
The cell is C194......
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2005-08-25 : 15:44:18
What do you mean you only want to import 1 cell?

You'll have to import all the data

Maybe you should write some VB Code, extract what you need, and add it to a 1 new sheet from all the other books.



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx
Go to Top of Page

GB
Starting Member

22 Posts

Posted - 2005-08-25 : 15:49:27
OK then importing all the data will work too...
Go to Top of Page
   

- Advertisement -