Loading String Data from DB2 to SQL Server - dropping special characters

  • Hi all,

    I'm loading data from a DB2 database into a table in SQL Server using SSIS. I'm using SQL Server 2008 R2.

    A couple of the columns are character strings, varchar(1500) data types in the source and I'm loading them into columns in my target table that are nvarchar(1500).

    The strings load fine except for one thing, some of the special characters are being dropped. Characters like single quote/apostrophe ('), double quote ("), hyphen (-) are not showing up in the target column, the characters are being replaced with a space. For example, "the customers' injuries" is being loaded as "the customers injuries" - note the apostrophe is gone.

    I've tried using varchar but I got the same result. I've tried varies Google searches to no avail. Does anyone know how to get these characters to come through? Apologies if I'm missing something obvious.

    I appreciate any suggestions.

  • The first thing I would do is try to work out at what stage the characters are being dropped. You can think of your package as going through the following stages:

    1) Execute source query.

    2) Copy results from source query to SSIS variables.

    3) Process SSIS variables (derived columns, data conversions etc.)

    4) Write SSIS variables to destination columns.

    Try modifying your source query to include only a few rows (including some which come through wrongly) and then use Data Viewers to work out at what stage the problem is occurring. Once you know that, hopefully the solution will become clear (or you can post back).

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

Viewing 2 posts - 1 through 1 (of 1 total)

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