2010-09-17 202 views
0

我想從SQL Server中導出一些信息。 SQL在SQL Management Studio中運行良好,但是當我嘗試導出時,它給我提供了以下錯誤。 我有問題之前,與此類似,並添加SQL Server導出錯誤:0xc0202009,0xc0209029和0xc0047022

SET ANSI_WARNINGS OFF 

線固定它。該行不是這次工作。

編輯: 我試着用SQL SELECT * FROM Table仍然得到錯誤。

的SQL基本上是:

SELECT [Table] 
     , CASE WHEN [UserID] IS NULL THEN '' ELSE [UserID] END AS [UserID] 
     , CASE WHEN [fieldname] IS NULL THEN '' ELSE [fieldname] END AS [fieldname] 
     , CASE WHEN [fieldname] IS NULL THEN '' ELSE [fieldname] END AS [fieldname] 
     , CASE WHEN [fieldname] IS NULL THEN '' ELSE [fieldname] END AS [fieldname] 
          ... more ... 
     , CASE WHEN [fieldname] IS NULL THEN '' ELSE [fieldname] END AS [fieldname] 
     CASE WHEN [fieldname] IS NULL THEN '' ELSE [fieldname] END AS [fieldname] 
    FROM Table 

錯誤:

Messages 
Error 0xc0202009: Data Flow Task 1: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x00040EDA. 
(SQL Server Import and Export Wizard) 

Error 0xc0209029: Data Flow Task 1: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "input "Destination Input" (174)" failed because error code 0xC020907B occurred, and the error row disposition on "input "Destination Input" (174)" specifies failure on error. An error occurred on the specified object of the specified component. There may be error messages posted before this with more information about the failure. 
(SQL Server Import and Export Wizard) 

Error 0xc0047022: Data Flow Task 1: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "Destination - Query" (163) failed with error code 0xC0209029 while processing input "Destination Input" (174). The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running. There may be error messages posted before this with more information about the failure. 
(SQL Server Import and Export Wizard) 
+0

SSIS有最糟糕的錯誤。 – HLGEM 2010-09-17 18:03:53

回答

1

我這個粉最多微軟是一個傻瓜。

我有一些字段是日期。日期都適用於導出,除了1790年的日期之外。如果我將所有日期早於1800的日期轉換爲空白,則導出工作得很好。

這些錯誤如何與這個問題有關,你得到了我。

要走的路M $

+2

SQL Server的'DATETIME'數據類型在其範圍內有一個已知和記錄的限制,並且無法處理1753-01-01之前的日期。 SQL Server 2008及更新版本中新的'DATE'或'DATETIME2'數據類型不再有這種限制。 – 2010-09-17 05:02:53

+0

我知道SQL限制,導出到excel文件。我猜這裏有一個更有限的侷限。 – Justin808 2010-09-18 00:56:22