Invalid character value for cast specification

  • I have a txt file with data as below:

    col1,col2,col3

    NY,14319,9900

    MA,14241,9900

    CA,14358,Get WO NE

    To load this file, I am using a flat file source and I have declared the data type of all three columns as Unicode String with 500 length in the advance editor..But when I run this package, I am getting an error at the third line:

    Invalid character value for cast specification

    I get this error at the source adapter only..Can someone please help me out here..

    P.S. Not giving a table structure as this a txt file

    I am using SSIS 2008

  • A guess, SSIS is expecting the third column to be an integer and the text data it found can't be converted.

  • Thanks for the reply mate..

    but I have already mentioned the data type of the columns as Unicode String with 500 length..in the connection manager and in the source adapter as well :crazy:

  • Okay, I gave it my shot in the dark. Unfortunately we can't see what you see so unless you provide us with more information that's about all you will get.

    The force may be strong, but it isn't that strong.

  • What's on row 4?

    If you remove that row, does the rest of the file process OK? If not, what else fails?

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

  • Row 4 is again like below:

    CA,93455,9435

    I am not able to process the file after row#3 where it is failing in the data flow task..even redirecting the erranous rows fails as the source adapter is struggling to cast the value in the third row

  • Can you provide the complete and uneditted error message?

Viewing 7 posts - 1 through 6 (of 6 total)

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