IMPORTANT:
this is not a Support Forum! Experienced users might answer from time to time questions posted here. If you need a professional and reliable answer, or if you want to report a bug, please contact Altova Support instead.

mapping empty/null date column Options · View
tushu373
Posted: Wednesday, November 19, 2014 8:00:38 PM
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
vlad
Posted: Thursday, November 20, 2014 9:59:46 AM
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.
tushu373
Posted: Thursday, November 20, 2014 1:57:05 PM
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
Users browsing this topic
guest

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Use of the Altova User Forum(s) is governed by the Altova Terms of Use.