• stewartc-708166 (4/30/2010)


    In SSIS, an example of how to identify and correct would be:

    CODEPOINT(ColumnName) < MinCodePageValue || CODEPOINT(ColumnName) >MaxCodePageValue ? (DT_WSTR,26)NULL(DT_WSTR,26): (DT_WSTR,26)ColumnName

    a T-SQL equivalent would be:

    SELECT CASE

    WHEN ASCII(ColumnName) < MinCodePageValue OR ASCII(ColumnName) > MaxCodePageValue THEN NULL

    ELSE ColumnName

    END AS ColumnName

    .

    .

    .

    Rather than use NULL here, mightn't it be better to find out what replacement character the mainframe app would have used if required to display this data and use that character?

    very good question and discussion. Lots for me to learn from it.

    Tom