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.
| Author |
Topic |
|
jung1975
Aged Yak Warrior
503 Posts |
Posted - 2004-08-13 : 13:44:30
|
| What is the best way to import .csv file witch has 200,000 records? I can open it up in excel, but it shows only 65,536 records.Can someone tell me the steps to import .csv file into SQL server? |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2004-08-13 : 13:50:53
|
| Why do you need to open it up in Excel? Just import the csv using DTS. csvs do not have a 65,536 limit. I believe that limit is with Excel. But you don't have to use Excel to open a csv file. Any text editor would open it up. But why bother? Just import it, then view the data in SQL Server.Tara |
 |
|
|
kselvia
Aged Yak Warrior
526 Posts |
Posted - 2004-08-13 : 19:04:04
|
| In addition to DTS you can also use BULK INSERT:BULK INSERT dbname.dbo.tablename FROM 'c:\path\file.csv' with (FIELDTERMINATOR = ',',ROWTERMINATOR = '\n' , TABLOCK)--Ken"Knowledge is a process of piling up facts; wisdom lies in their simplification." |
 |
|
|
derrickleggett
Pointy Haired Yak DBA
4184 Posts |
Posted - 2004-08-14 : 12:10:58
|
| Excel has that limit because that's the maximum number of rows per worksheet. You could also use bcp, which you can read all about in Books Online.MeanOldDBAderrickleggett@hotmail.comWhen life gives you a lemon, fire the DBA. |
 |
|
|
|
|
|