Archives of the TeradataForum
Message Posted: Thu, 13 Jul 2006 @ 10:19:22 GMT
Subj: | | Re: Fastload a non-fixed-formatted date field |
|
From: | | Victor Sokovin |
I can only offer something which does not look pretty.
select '7/1/2006' S,
(substring(S from 1 for position('/' in S) -1) (int,format '99')
(char(2)) )
|| '/' || (substring(S from position('/' in S)+1 for position('/' in
substring(S from position('/' in S)+1))-1) (int,format '99')
(varchar(2)) )
|| '/' || (substring(
substring(S from position('/' in S)+1)
from position('/' in substring(S from position('/' in S)+1))+1)
(varchar(4)))
(date, format 'MM/DD/YYYY');
You might need to adapt this to the FastLoad (S=:open_date) context and try whether it works. I have only tested this in Bteq.
Alternatively, you could modify the input file using all the power of the operating system and its utilities.
Regards,
Victor
|