Certain text characters cause my package to fail

  • Hello All,

    My users paste data from word processing documents into a vendor-supplied application. Sometimes this pasted data contains formatting and other 'special' characters. This application exports data into text files which I subsequently import using SSIS.

    My SSIS packages fails when it encounters characters like the below:

    –

    The error is "Text was truncated or one or more characters had no match in the target code page."

    Is there a method I can use to prevent this?

    My source file connection manager has unicode unchecked.

    Looking at the advanced editor at my flat file source the input and output columns have a code page of 1252.

    I can't change the app or export process, only the import process. It would be ok to strip out the offending characters.

    Any suggestions?

  • What if you import is as unicode?

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Thanks for you reply.

    I end up getting the "cannot convert between unicode and non-unicode data types" error on a particular field.

    If I do set the file to unicode would my destination table necessarily have to have contain nvarchar fields? Currently it is varchar.

  • Chrissy321 (2/10/2012)


    Thanks for you reply.

    I end up getting the "cannot convert between unicode and non-unicode data types" error on a particular field.

    If I do set the file to unicode would my destination table necessarily have to have contain nvarchar fields? Currently it is varchar.

    Well yes. Or you import is as unicode, get rid of the special characters, convert it back to non-unicode and then export it to SQL Server.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Ok, thank you, I now have a better handle on my options. I need to decide if I am going to change the table or go the conversion route.

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

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