Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 16 Dec 2006 @ 00:43:59 GMT


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


Subj:   Re: Looking for bad data
 
From:   Vinay Bagare

     SEL
     -- '1234M' AS sno -- CHAR type
     '12%5M' AS sno -- CHAR type
     ,CASE SUBSTRING(sno FROM 5 FOR 1) = 'M' AND
                  CHAR2HEXINT(SUBSTRING( sno FROM 1 FOR 1)) BETWEEN '0030' AND '0039' AND
                  CHAR2HEXINT(SUBSTRING( sno FROM 2 FOR 1)) BETWEEN '0030' AND '0039' AND
                  CHAR2HEXINT(SUBSTRING( sno FROM 3 FOR 1)) BETWEEN '0030' AND '0039' AND
                  CHAR2HEXINT(SUBSTRING( sno FROM 4 FOR 1)) BETWEEN '0030' AND '0039'
     THEN 'MATCH' ELSE 'Mis MATCH' END AS "Result"

I realized that we don't need LOWER/UPPER functions now. I modified the SQL w/out these.


Thanks,

Vinay Bagare



     
  <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