Using mload to load datetime field

Tools
Enthusiast

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!
2 REPLIES
Enthusiast

Re: Using mload to load datetime field

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 ..
Enthusiast

Re: Using mload to load datetime field

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