2012-02-28 52 views
0

我創建了一個名爲test2SQL Server 2008 R2SQL導入嚮導無法映射TINYINT

ID如下表||用戶標識||時間

TINYINT唯一標識符的時間(7)

如下包含單個行

ID我已創建了一個.csv文件爲同一||用戶標識||時間(7)

1 b64d51a8-852f-40EA-ab4c-080df747214b 00:00:00

現在,I M使用SQL導入嚮導插入該行到我的數據庫表中。

在選擇下面的映射(見下文)我得到這個錯誤:

Executing (Error) 
    Messages 
    Error 0xc02020a1: Data Flow Task 1: Data conversion failed. The data conversion for column "Column 0" returned status value 2 and status text "The value could not be converted because of a potential loss of data.". 
(SQL Server Import and Export Wizard) 

    Error 0xc0209029: Data Flow Task 1: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. 
    The "output column "Column 0" (10)" failed because error code 0xC0209084 occurred, and the error row  disposition on "output column "Column 0" (10)" 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 0xc0202092: Data Flow Task 1: An error occurred while processing file  
    "C:\Users\parth\Documents\test2.csv" on data row 1. 
    (SQL Server Import and Export Wizard) 

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

映射:

ID(TINYINT) - > SSIS單字節無符號整型

用戶ID(唯一標識符) - > SSIS唯一標識符

時間(7)---> SSIS數據庫時間與精度

任何人都可以告訴我我在做什麼錯嗎?有什麼辦法解決這個錯誤?

在此先感謝

+0

我自己試了一下,我不能選擇一個空格作爲分隔符。你是否嘗試過不同的分隔符,如製表符或分號? – fancyPants 2012-02-28 12:38:15

+0

我使用','作爲分隔符..檢查此:http://pastie.org/3479640 – 2012-02-28 12:47:00

+0

我知道SSIS的這些錯誤。通常這是目標列中的錯誤數據類型。但我自己嘗試過,我可以做我想做的事,但我得到了同樣的錯誤。有點奇怪。對不起,現在不能幫你。 – fancyPants 2012-02-28 13:00:36

回答

1

使用單字節無符號整數作爲源數據類型映射到一個TINYINT目的地。 tinyint使用1個字節的存儲空間,其值範圍爲0到255,因此它是無符號的。