ssisdata-warehousesql-data-warehouse

How do I replace "?" with NULL in SSIS expression?


There are ? in my data columns and I have to replace them with NULL. In my SSIS package.


Solution

  • if a question mark is in the column already it must be some kind of string.

    Use a derived column and a if function:

    [colName] == "?" ? NULL(DT_STR, «length», 1252) : [colName]
    

    or

    [colName] == "?" ? NULL(DT_WSTR, «length») : [colName]