locked
SSIS: Conditional Split string comparison works incorrectly extracting MySQL databases RRS feed

  • Question

  • I am using SQL Server 2012-BI on Windows Server 2012.  I am writing SSIS jobs on Visual Studio Pro 2012, SSDT 11.1.  I'm not sure of the version of SSDT-BI (maybe it's the same as SSDT???) because it doesn't show up in my VS Help->About installed product list.

    I am trying to extract a MySQL DB into a staging SQL Server DB.  I have the following Data Flow Tasks set up in SSIS to do this:

    ODBC Source (for MySQL) -> Lookup (for SQL Server) -> Conditional Split-> ...

    The Lookup task tells me if the record already exists

    The Conditional Spli:

    1. compares key fields to see if the lookup returned null making it a new record

    2. then compares some fields to see if this is an existing record that needs updating.

    One of the fields I'm comparing in step 2 of the Conditional Split is a Char(30) and the comparison doesn't work.  The conditional split determines the strings are unequal even though I can see that they are equal and not null (using Data Viewer).

    Is this a code page problem?  What should I do if it is?

    Thursday, November 7, 2013 6:50 PM

All replies

  • did you try Trimming it and then comparing?

    Char(30) means if actual string is less than 30 in length then it will be padded with empty spaces.

    • Proposed as answer by Mike Yin Tuesday, November 12, 2013 12:52 PM
    • Unproposed as answer by dsa42x Tuesday, November 12, 2013 2:59 PM
    Thursday, November 7, 2013 7:09 PM