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 |
|
imughal
Posting Yak Master
192 Posts |
Posted - 2004-10-04 : 06:43:52
|
| i m working to insert bulk record from csv file i m trying following code but getting error.bulk insert ordersfrom 'c:\orders.csv' WITH ( FIELDTERMINATOR = ',', ROWTERMINATOR = '\n' )tell me how to do bulkminsert from csv file. |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2004-10-04 : 13:39:50
|
| What error are you getting?Tara |
 |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2004-10-04 : 14:00:30
|
| Depends what format the file isThings to look for:Row terminator being one of crlf instead of both.Embedded ',' withing fields messing things up - nothing you can do about that unlessQuote delimmitted character fields.Extra blank lines at the end of the file.Try it with a couple of lines from the file first to see if the structure is closeseehttp://www.nigelrivett.net/BCP_quoted_CSV_Format_file.html==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
|
|
|