Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 04 May 2010 @ 13:38:00 GMT


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


Subj:   Re: Timestamp issue in mload
 
From:   Rob Paller

I believe your timestamp format is incorrect. Try "mm/dd/yyyy hh:mi:ss" instead in your CASE statement:

     ,CASE WHEN CHARACTERS(TRIM(:EMI_PRE_CLR_DTE))>8 THEN CAST(:EMI_PRE_CLR_DTE
       AS TIMESTAMP(0))
      WHEN CHARACTERS(TRIM(:EMI_PRE_CLR_DTE))=8 THEN
     /* Reconstruct this to the format listed above */
      CAST(CAST(SUBSTR(:EMI_PRE_CLR_DTE,1,4)
      ||'-'|| SUBSTR(:EMI_PRE_CLR_DTE,5,2) ||'-'||
      SUBSTR(:EMI_PRE_CLR_DTE,7,2)
      AS CHAR(10))||
      CAST(' 00:00:00' AS CHAR(9))  AS TIMESTAMP(0))
     /* Already changed format here */
      ELSE CAST(  '09/01/2010 00:00:00'AS TIMESTAMP(0)) END


     
  <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