[英]sql server - bulk insert error
I am using bulk insert and getting below error: 我正在使用批量插入并获得以下错误:
Note: The data in the load file is not beyong the configured column length 注意:加载文件中的数据不是配置的列长度
bulk insert load_data from 'C:\\temp\\dataload\\load_file.txt' with (firstrow = 1, fieldterminator = '0x09', rowterminator = '\\n',MAXERRORS = 0, ERRORFILE = 'C:\\temp\\dataload\\load_file') 从'C:\\ temp \\ dataload \\ load_file.txt'批量插入load_data,其中(firstrow = 1,fieldterminator ='0x09',rowterminator ='\\ n',MAXERRORS = 0,ERRORFILE ='C:\\ temp \\ dataload \\ load_file “)
user_name file_path asset_owner city import_date
admin C:\ admin toronto 04/12/2012
Msg 4863, Level 16, State 1, Line 1 Msg 4863,Level 16,State 1,Line 1
Bulk load data conversion error (truncation) for row 1, column 6 (validated). 第1行第6列的批量加载数据转换错误(截断)(已验证)。
Msg 7399, Level 16, State 1, Line 1 Msg 7399,Level 1,State 1,Line 1
The OLE DB provider "BULK" for linked server "(null)" reported an error. 链接服务器“(null)”的OLE DB提供程序“BULK”报告错误。 The provider did not give any information about the error. 提供商未提供有关错误的任何信息。 Msg 7330, Level 16, State 2, Line 1 Msg 7330,Level 16,State 2,Line 1
Cannot fetch a row from OLE DB provider "BULK" for linked server "(null)". 无法从OLE DB提供程序“BULK”获取链接服务器“(null)”的行。
The number of columns was incorrect. 列数不正确。 I had recently changed the table schema but forgotten to do a refresh on the table. 我最近更改了表模式,但忘了在表上刷新。
I solved the same problem by changing the data type in the schema. 我通过更改架构中的数据类型解决了同样的问题。 I had date type changed to nvarchar... It worked 我将日期类型更改为nvarchar ...它有效
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.