Author |
Topic |
paulkem
Starting Member
28 Posts |
Posted - 2013-01-11 : 10:00:49
|
I have an OLE DB connection to an IBM DB2 source. I am trying to bring in some data from a query on a few tables. One of the fields I am trying to import is defined as a CHARACTER with a length 70.When I run the package, I get the following errors:[OLE DB Source [1]] Error: There was an error with output column "CC_COMMENT" (743) on output "OLE DB Source Output" (11). The column status returned was: "Text was truncated or one or more characters had no match in the target code page.".[OLE DB Source [1]] Error: The "output column "CC_COMMENT" (743)" failed because truncation occurred, and the truncation row disposition on "output column "CC_COMMENT" (743)" specifies failure on truncation. A truncation error occurred on the specified object of the specified component.I have tried adding a Data Conversion and converting to both DT_STR and DT_WSTR with Lengths of 70 and 255.I have tried inserting into both a varchar(max) field as well as a char(255) and an nvarchar(max)In every case, it fails.Any ideas?PK |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-01-11 : 10:19:49
|
whats the datatype in destination field?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
paulkem
Starting Member
28 Posts |
Posted - 2013-01-11 : 11:15:31
|
I have tried various destination data types. varchar(max), varchar(255), nvarchar. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-01-11 : 11:28:28
|
can you try puttinf an error output and dump results to text file and check data which is breaking?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
paulkem
Starting Member
28 Posts |
Posted - 2013-01-14 : 09:15:51
|
I am not sure how to do that. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-01-14 : 10:04:32
|
check for on error property inside task and in dropdown select redirect to output and then you'll get an additional output (red line) for task. you can link this to a text file destination task to capture error values------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
jackv
Master Smack Fu Yak Hacker
2179 Posts |
|
paulkem
Starting Member
28 Posts |
Posted - 2013-01-14 : 12:24:56
|
I believe the error output has shed some light on the problem. It appears that the records that are failing have some unknown character in place of the apostrophe?examples:THAT?SI?MCAN?TDIDN?TThese words appear as such in the actual source system:THAT SI MCAN TDIDN TI have no idea how this happened.So now that I have found the problem, how do i account for these unknown characters and ignore them so that the rest of the text comes over? |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-01-15 : 00:16:37
|
quote: Originally posted by paulkem I believe the error output has shed some light on the problem. It appears that the records that are failing have some unknown character in place of the apostrophe?examples:THAT?SI?MCAN?TDIDN?TThese words appear as such in the actual source system:THAT SI MCAN TDIDN TI have no idea how this happened.So now that I have found the problem, how do i account for these unknown characters and ignore them so that the rest of the text comes over?
You need to understand what exactly were those characters. they might be some unprintable characters. Try to get their ASCII value and then use derived column task using REPLACE() function to strip them off------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
|