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 |
|
raysefo
Constraint Violating Yak Guru
260 Posts |
Posted - 2006-06-11 : 14:02:48
|
| Hi,i have a very huge data (with 7 columns) on wordpad and i wanna import this into my sql server. Would you please help me?thanks |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2006-06-11 : 14:33:46
|
| Save it as csv and bulk insert it?==========================================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. |
 |
|
|
raysefo
Constraint Violating Yak Guru
260 Posts |
Posted - 2006-06-12 : 09:39:29
|
| Hi,i tried to bulk insert the csv file as written below;BULK INSERT OrdersBulk FROM 'c:\file.csv' WITH ( FIRSTROW = 2, FIELDTERMINATOR = ',', ROWTERMINATOR = '\n' )But unfortunately gave this error,Server: Msg 2775, Level 16, State 1, Line 1Code page 857 is not supported by the operating system.The statement has been terminated. |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
raysefo
Constraint Violating Yak Guru
260 Posts |
Posted - 2006-06-12 : 11:16:53
|
| Its Microsoft Excel Comma Separated Values File and came from UK! |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
Arnold Fribble
Yak-finder General
1961 Posts |
Posted - 2006-06-12 : 12:19:42
|
| It's probably the funny OEM default for input file codepage in BULK INSERT that's a problem. Use:CODEPAGE = 'ACP'Even so, if it's csv output from Excel, you'll probably have problems with the field quoting and quote escaping. BULK INSERT doesn't have any mechanism for handling them. |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
|
|
|
|
|