Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Handle NULL data in datetime field

Status
Not open for further replies.

dorsun

Programmer
Feb 16, 2009
1
US
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top