All Forums Tools
jefflimpc 6 posts Joined 05/07
08 May 2007
Using mload to load datetime field

Hi all, i am fairly new to Teradata, so appreciate your help here...I am trying to use mload to load a flat file into a Teradata table. The flat file contains a field in the format yyyy-mm-dd hh:mm:ss:00 which I want to load into the table as a date field(yyyy-mm-dd).I tried using CAST(:IN_BIRTHDATE as DATE FORMAT 'YYYY-MM-DD') but it keeps complaining of invalid date for that field.Thanks in advance!

joedsilva 505 posts Joined 07/05
08 May 2007

Since you are actually ignoring those fields, I think a quick solution would be to just declare the extra as FILLER and ignore it.ie something like.FIELD IN_BIRTHDATE * CHAR(10);.FILLER IN_BIRTHTIME * CHAR(12);then just ignore IN_BIRTHTIME in your inserts ..

jefflimpc 6 posts Joined 05/07
09 May 2007

Thanks, I tried casting it as a TimeStamp field and it worked...

You must sign in to leave a comment.