Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 10 Feb 2009 @ 21:22:56 GMT


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


Subj:   Re: Multiload SQL and Case statement
 
From:   Pinti, Michele A

  The first thing I would recommend that you do is compare apples with apples. Besides, what day of the month is '1_' and how can you keep that one?  


We want to keep the record but set this field to a null if it is invalid.


  Regardless, you are comparing a two-byte char field out of SUBSTR with a number and making MLoad do a conversion. If you are comparing wouldn't a better comparison be BETWEEN '01' and '31' for day and '01' and '12' for month?  


I tried this case statement but records with invalid values are still being dropped.

     , Case when :USAGE_YEAR_BEG_VAL_DY between '00' and '31'
            then :USAGE_YEAR_BEG_VAL_DY
            else null
            End

     , case when :USAGE_YEAR_BEG_VAL_MO between '00' and '12'
            then :USAGE_YEAR_BEG_VAL_MO
            else null
            End

Thanks,

Michele



     
  <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