【发布时间】:2018-07-05 20:33:22
【问题描述】:
我正在尝试使用导入和导出向导将小型数据集从 CSV 文件移动到现有(空)表。我执行了 Script Table As > Create To,以获取该表的所有 DML。我知道导致问题的两个字段的字段类型是 varchar(50)。我收到此错误消息:
Error 0xc020902a: Data Flow Task 1: The "Source - Reconciliation_dbo_agg_boc_consolidated_csv.Outputs[Flat File Source Output].Columns["ReportScope"]" failed because truncation occurred, and the truncation row disposition on "Source - Reconciliation_dbo_agg_boc_consolidated_csv.Outputs[Flat File Source Output].Columns["ReportScope"]" specifies failure on truncation. A truncation error occurred on the specified object of the specified component.
(SQL Server Import and Export Wizard)
所有字符的最大长度为 49,所以我不确定 SQL Server 为何抱怨截断。有什么方法可以禁用此错误检查并强制它工作?它应该按原样工作!谢谢大家。
【问题讨论】:
-
检查您的输入文件。至少有一行 len(ReportScope) > 50 个字符。
标签: sql-server sql-server-2008