Truncation, tried OLE DB Output colum

  • I am using an SSIS to get data into a textfile.

    This is the error at the SOURCE (SOURCE is red):

    [Source - Query [1]] Error: There was an error with output

    column "LONG_NAME" (6905) 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.".

    I am selecting

    "SELECT

    SUBSTR(char(LONG_NAME),0,80) AS LONG_NAME

    FROM mytable"

    hence the OLE DB Output colum (input and output prop) shows

    datatype string[DT_STR] and length 80.

    all seems fine but its just not working..

    any ideas?

  • CHAR() only accepts integer value. what if you drop it entirely

    SELECT SUBSTRING(LONG_NAME,0,80) AS LONG_NAME

  • Hello dwithroder, well dropping by substring does not solve the issue. I

    introduced that to get around it but did not help.

    I also introduced some error handling.

    If I set the error handling to redirct for truncate and component failure

    the whole package runs through but nothing gets redirected..no errors.

    http://metalray.redio.de/dokumente/dataview.JPG%5B/img%5D

    when I set component failure: fail and truncate:fail the whole

    package fails again after 17xxxxxx rows.

    [img]https://www.sqlservercentral.com/Forums/Uploads/image-unavailable.png">

    what is going on? casting and changing code pages did not work well either

    (did not let me set code page 1250 for central europe)

  • it worked with substr(xxxx,1,20) but as soon

    as I did substr(xxxx,1,80) it failed with truncation....

    I narrowed it down to be between substr(xxxx,1,45) that works

    but substr(xxxx,1,49) that failes. What on earth does that mean....that one of the characters between 45 and 49 makes the ssis component fail with a truncation/code page error?

  • what happens if you run query in management studio?

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply