dawsonz
dawsonz

Reputation: 33

SSIS -Text was truncated or one or more characters had no match in the target code page

I have the following text stored in DB2 file;

SRCDTA
//?Don't import definition if we've already got it
//?eof

I'm trying to pull this data in SSIS using data flow task, an OLE DB Source, however, when I execute the task, it says the following error message;

[OLE DB Source [2]] Error: There was an error with OLE DB Source.Outputs[OLE DB Source Output].Columns[SRCDTA] on OLE DB Source.Outputs[OLE DB Source Output]. The column status returned was: "Text was truncated or one or more characters had no match in the target code page.".

The output column is currently stored as a string with length 100.

I have tried extending the length, to no avail.

The query i'; using is as follows;

Select TRIM(SRCDTA) AS SRCDTA from asc.myqcpy

Upvotes: 0

Views: 336

Answers (1)

nfgl
nfgl

Reputation: 3212

I guess this is DB2 for IBM i (aka AS/400 or ISeries)

If so it is common in source files to see characters between hex 20 and hex 3f, they are display attributes (color, underline, ...) characters that define how the following characters should be displayed s

I guess those characters cause the error, you can have spaces instead using

select
  TRIM(
    translate(SRCDTA, ' ',
        x'202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f')
  ) as SRCDTA
from
  asc.myqcpy

Upvotes: 0

Related Questions