How to convert blank into null in ssis

Sandeep Pulikonda picture Sandeep Pulikonda · Oct 24, 2012 · Viewed 87.5k times · Source

I am extracting data from excel in ssis. One of the excel column contain blank values. so i need to replace blank value with null otherwise my package is going to fail. Any suggessions?

Answer

Farfarak picture Farfarak · Oct 24, 2012

In DataFlow use DerivedColumn component.

Replace your column and in expression put this line of code

ColumnName == "" ? NULL(DT_WSTR,50) : ColumnName

It will make sure to return null if column is empty