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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2005-02-22 : 07:41:04
|
| shtjasows writes "when I want to insert to a table (sql server 2000) from a xls file,there is a error:SQLState = 22001, NativeError = 0Error = [Microsoft][ODBC SQL Server Driver] string data£¬right truncationand my codes :exec master..xp_cmdshell'bcp bluepages..Lanji in e:\dd.xls -c -Usa -P000000'who may help me and tell me why or how to do ?thanks" |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2005-02-22 : 07:41:55
|
| bcp does not work with native Excel files, it only works with text files (CSV, tab-delimited). You can either save your Excel sheet to one of these formats and use bcp on it, or use DTS to import from Excel directly. |
 |
|
|
|
|
|