SQL Server导出错误

时间:2010-09-01 20:44:03

标签: sql-server export export-to-excel

我正在尝试通过SQL Server导入和导出向导导出SQL语句的结果。我收到2个错误:

- Copying to `Query` (Error)
Messages
Error 0xc0202009: Data Flow Task 1: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 10.0"  Hresult: 0x00040EDA  Description: "Warning: Null value is eliminated by an aggregate or other SET operation.".
 (SQL Server Import and Export Wizard)

Error 0xc0047038: Data Flow Task 1: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED.  The PrimeOutput method on component "Source - Query" (1) returned error code 0xC0202009.  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)

执行操作工作正常,如果我在SQL Server管理工作室中运行SQL它就可以正常工作。

这些错误意味着如何解决它们以便出口有效?如果重要,我将导出到Excel,并选择版本97-2003。

1 个答案:

答案 0 :(得分:1)

本文讨论了此错误的原因和解决方法。 http://www.developmentnow.com/g/113_2006_9_0_0_828485/Warning-Null-value-is-eliminated-by-an-aggregate-or-other-SET-operation-.htm

快速回答是您可以在运行查询之前使用此命令关闭警告:

设置ANSI_WARNINGS OFF

但是,如果它在SP中,它将在每次运行时重新编译SP。