2012-02-28 96 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,因此它是无符号的。