Tuesday, March 20, 2012

Processing NULL values

I have an input file that may have NULL's in it's fields. The fields are of a various data types.

The NULL value is represented by ? - question mark.

Is there a way to set package or file connection up in a way - so it treats ? as NULL?

The only other way I found is to use Derived column - and so I have to create derived field for most of the fields (150 of them) since a lot of them may contain ? - or NULL.

Any ideas?

You could build your own custom source adapter but it be quicker to use the derived column.

-Jamie

|||

what adds pain is that two operations must occur for each column: relace ? with null and data conversion.

So, I have to create following expression in Derived Column for most columns:

[fiel1] == "?" ? NULL : (DT_DTAE) [fiel1]

and repeat this 150 times...

No comments:

Post a Comment