sql-server – SQL Server导入向导失败并显示不可理解的消息

前端之家收集整理的这篇文章主要介绍了sql-server – SQL Server导入向导失败并显示不可理解的消息前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我只想从平面文件导入两列到一个新的表.我设置了一列“代码”为varchar(50),另一列’Description’为nvarchar(max).

导入失败,并显示以下消息:

- Executing (Error)
Messages
Error 0xc02020a1: Data Flow Task 1: Data conversion Failed. The data conversion for column "Description" returned status value 4 and status text "Text was truncated or one or more characters had no match in the target code page.".
 (sql Server Import and Export Wizard)

Error 0xc020902a: Data Flow Task 1: The "output column "Description" (14)" Failed because truncation occurred,and the truncation row disposition on "output column "Description" (14)" specifies failure on truncation. A truncation error occurred on the specified object of the specified component.
 (sql Server Import and Export Wizard)

Error 0xc0202092: Data Flow Task 1: An error occurred while processing file "C:\Users\rinaldo.tempo\Desktop\ICD10_Edition4_CodesAndTitlesAndMetadata_GB_20120401.txt" on data row 3.
 (sql Server Import and Export Wizard)

Error 0xc0047038: Data Flow Task 1: SSIS Error Code DTS_E_PRIMEOUTPUTFailed.  The PrimeOutput method on component "Source - ICD10_Edition4_CodesAndTitlesAndMetadata_GB_20120401_txt" (1) returned error code 0xC0202092.  The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component,but the error is fatal and the pipeline stopped executing.  There may be error messages posted before this with more information about the failure.
 (sql Server Import and Export Wizard)

错误消息告诉我,数据被截断,因为它被放置在“描述”列,其类型为nvarchar(max)!仔细观察输入数据,我会说这些说明永远不会超过2或300个字符,所以这是不成问题的.

任何人都可以建议这里有什么问题?

解决方法

导入中的字符串列的默认大小为50个字符.这种截断发生在数据发送到数据库之前. 您应该在“导入向导”的“列”部分的第一步进行调整.
原文链接:https://www.f2er.com/mssql/76037.html

猜你在找的MsSQL相关文章