Archives of the TeradataForum
Message Posted: Mon, 13 Jan 2003 @ 13:56:53 GMT
Subj: | | Re: Fastloading a Time Value |
|
From: | | Geoffrey Rommel |
| I have a Time in CHAR(6), format 'HHMMSS'. Can this be Fastloaded into column defined as TIME(0). If so what FORMAT do i need
within the VALUES statement. | |
Alas, no. TIME and TIMESTAMP are particularly finicky, perhaps because they are trying to conform to ANSI definitions. If you want to
load a TIME field, it must be in ANSI format, namely hh:mm:ss (8 bytes) or hh:mm:ss.dddddd (15 bytes). Since you want TIME(0), you should do
this:
- write an INMOD to reformat the field to 8 bytes, putting colons in;
- define the input field to FastLoad as char(8);
- insert into the table as :in_char_field. Do not specify a data conversion.
Strange as it may seem, this will work.
--wgr
|