sql-server – 从Excel导入SQL Server 2005的截断错误

前端之家收集整理的这篇文章主要介绍了sql-server – 从Excel导入SQL Server 2005的截断错误前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
长篇小说,我一个接一个地使用一堆excel文件,并使用导入/导出向导将它们导入sql Server 2005中的数据库.

这是一个报告(所有过程未显示为“成功”).有没有办法忽略截断错误?我已经googled了无济于事,或至少不在我的版本.

06000

column “Value Meaning Description”
(234) on output “Excel Source Output”
(9). The column status returned was:
“Text was truncated or one or more
characters had no match in the target
code page.”.
(sql Server Import and Export Wizard)

06001

Meaning Description” (234)” Failed
because truncation occurred,and the
truncation row disposition on “output
column “Value Meaning Description”
(234)” specifies failure on
truncation. A truncation error
occurred on the specified object of
the specified component.
(sql Server Import and Export Wizard)

06002

DTS_E_PRIMEOUTPUTFailed. The
PrimeOutput method on component
“Source – Sheet0$” (1) returned error
code 0xC020902A. 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)

06003

DTS_E_THREADFailed. Thread
“SourceThread0” has exited with error
code 0xC0047038. There may be error
messages posted before this with more
information on why the thread has
exited.
(sql Server Import and Export Wizard)

06004

DTS_E_THREADCANCELLED. Thread
“WorkThread0” received a shutdown
signal and is terminating. The user
requested a shutdown,or an error in
another thread is causing the pipeline
to shutdown. There may be error
messages posted before this with more
information on why the thread was
cancelled.
(sql Server Import and Export Wizard)

06003

DTS_E_THREADFailed. Thread
“WorkThread0” has exited with error
code 0xC0047039. There may be error
messages posted before this with more
information on why the thread has
exited.
(sql Server Import and Export Wizard)

06006

data insertion has started.
(sql Server Import and Export Wizard)

06007

data insertion has ended.
(sql Server Import and Export Wizard)

06008

Sheet0$” (323)” wrote 210 rows.
(sql Server Import and Export Wizard)

解决方法

向导使用较小的值作为Excel数据的标准varchar大小,而不是sql Server 2000中的向导中的值.因此,它通常会截断您正在尝试快速导入到临时表的数据.但是,当您执行该向导时,一个屏幕会询问您是否要编辑映射,并且可以修复这些字段的大小.或者你可以先创建一个table stament来创建一个你想要的大小的工作表(nvarchar(max)是好的,如果你是第一次查看数据,不知道这些字段将是多大)然后导入进去.使用Excel,我知道我也有sql服务器的问题只使用几行来确定数据类型,然后插入失败的记录(比如像partnumber这样的东西),因为它认为基于前几个记录它是一个整数,当它真的是字符串类型的数据.你也可能遇到这样的问题,所以即使没有收到截断错误,也是一个很好的方法来检查映射.

猜你在找的MsSQL相关文章