2010-09-01 68 views
1

我想通過SQL Server導入導出嚮導導出SQL語句的結果。我收到了2個錯誤:SQL Server導出錯誤

- 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 Management Studio中只是正常的SQL。

這些錯誤意味着如何解決這些錯誤,以便出口有效?如果有問題,我將導出到選擇了97-2003版本的Excel。

+0

你能告訴我們SQL語句嗎? – bobs 2010-09-01 20:51:42

回答

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

快速回答是,你可以使用此命令在運行查詢之前關閉警告:

SET ANSI_WARNINGS OFF

但是,如果這是一個SP中,它會重新編譯SP每當你運行它。

+0

MSSQL在導出過程中給出錯誤的意義是什麼,但不是在直接運行時出現錯誤?另外爲什麼停止導出的錯誤,這不是一個錯誤,可以輕鬆忽略?有沒有辦法「修復」SQL,使錯誤根本不會發生? – Justin808 2010-09-01 21:02:00

+0

@ Justin808:導致包失敗的警告消息的問題已被報告爲SSIS錯誤[此處](https://connect.microsoft.com/SQLServer/feedback/details/483175/failure-because-of-warning-關於無效聚合)。 – 2010-09-01 21:04:54

+0

2009年8月15日< - 很高興看到微軟是最重要的。 – Justin808 2010-09-01 21:09:46