I have a database field
birth_date (datetime, null)
My source file has birth_date column which is having 'NULL' as data in all the rows. I used a derived column transformation to have datatime column and used the expression as :
TRIM(birth_date) == "" ? (DT_DBTIMESTAMP)NULL(DT_DBTIMESTAMP) : (DT_DBTIMESTAMP)birth_date
But when I run the package, I get an error that the column could not be converted.
Please help how to handle nulls for numeric and datetime fields
Thanks.
birth_date (datetime, null)
My source file has birth_date column which is having 'NULL' as data in all the rows. I used a derived column transformation to have datatime column and used the expression as :
TRIM(birth_date) == "" ? (DT_DBTIMESTAMP)NULL(DT_DBTIMESTAMP) : (DT_DBTIMESTAMP)birth_date
But when I run the package, I get an error that the column could not be converted.
Please help how to handle nulls for numeric and datetime fields
Thanks.