Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 13 Jul 2006 @ 10:19:22 GMT


     
  <Prev Next>   <<First <Prev Next> Last>>  


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



     
  <Prev Next>   <<First <Prev Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023