-
csv into sql table
I recently wrote an app that takes a tab delimted file in notepad, split the delimeter, and import it into a column in sql. Just one column.
Now I have to do the same thing, only Its a excel sheet (csv) and it has about 17 column headers. I want to do the same thing, but I'm having trouble figuring out how to tell it which column in excel belongs to which column in sql. I've created a sql table with the exact column headers as the excel sheet, and want it to insert accordingly.
I can post the code I used to get the single column data in from my last project. Any help would be great!
Thank you and I hope this isnt' too confusing.
-
Is this MS SQL SERVER?
If so, have you looked into the BULK INSERT command or the BCP command line utility?
-
Yes it is MS Sql server 2000.
I don't think I've heard of the bulk insert command.
-
You could also create a DTS import package. You can easily transform
your data and map fields too. Look in Enterprise Manager to
create a package.