all groups > sql server dts > may 2006 >
You're in the

sql server dts

group:

Data Conversion task - TruncationRowDisposition


Data Conversion task - TruncationRowDisposition Erik Caha
5/12/2006 11:15:49 PM
sql server dts:
Hello,

I have, very simple dataflow task:

OLEDB Source
[varchar(12) CodeId "ASDF "]
|
V
Data Conversion
[varchar(12) CodeId -> nvarchar(8) CodeId]
|
V
OLEDB Destination
[nvarchar(8) CodeId]

The task fails with this error message:

Data conversion failed while converting column "CodeId" (20) to column
"CodeId" (114). The conversion returned status value 2 and status text
"The value could not be converted because of a potential loss of data.

OK, I set property TruncationRowDisposition = RD_IgnoreFailure, but the
task still fails with same message. It looks like setting property did
not affect result.

When I set property ErrorRowDisposition = RD_IgnoreFailure, conversion
task succeed, but OLEDB Destination fail with following error message:

There was an error with input column "CodeId" (126) on input "OLE DB
Destination Input" (83). The column status returned was: "The value
violated the integrity constraints for the column.".

There is solution, set conversion as [varchar(12) CodeId -> nvarchar(12)
CodeId] and than whole data flow task succeed only with warning.
However, it is not clean solution and I do not know where I made the
mistake or how can I accomplish this simple task.

Thanks


--
-----
Re: Data Conversion task - TruncationRowDisposition Allan Mitchell
5/15/2006 12:00:00 AM
Hello Erik,

So here is what I did

CREATE TABLE A (col1 VARCHAR(12))
GO
INSERT A VALUES('AAAAAAAAAAAA')
GO
CREATE TABLE B (col1 NVARCHAR(8))


I then added a Data Conversion transform to take the VARCHAR(12) to an NVARCHAR(8).
I set the ERRORROW and TRUNCATION row disposition to IGNORE on the new column
from thee DC Conver (Copy Of Col1)

I then sent the "Copy Of Col1" column to the Col1 in Table B and it worked
fine.

Are you trying to sent the original column to the destination?


Allan



[quoted text, click to view]

AddThis Social Bookmark Button