Rank: Newbie
Joined: 7/31/2014 Posts: 5 Location: boston
|
Hi All
I am mapping a flat file to MSSQL database. Source file has column with YYYYMMDD format, and I am mapping it with DATE column in MSSQL server. i am using parse-date function, with [Y,4-4][M,2-2][D,2-2] as format. It works fine, until the source file have empty or null in it. and give error "Month 0 out of range".
My question is , if the source column has null values then it should insert null into database. How to handle if the column has null values?
thanks Tushar
|
Rank: Advanced Member
Joined: 12/13/2005 Posts: 2,856 Location: Mauritius
|
You get this error from the parse-date function, I guess. Use If or Filter to avoid passing empty values to this function.
|
Rank: Newbie
Joined: 7/31/2014 Posts: 5 Location: boston
|
thanks VLAD, i used empty string function and the filter node and then parse date as you suggested and it worked.
thanks a lot
|