Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 16 Jun 2004 @ 15:55:04 GMT


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


Subj:   Re: How to identify numerics in alphanumerics ?
 
From:   Jeremy Christiansen

If you already know the data contains only numbers and letters, then the following will select all rows with pure numeric values:

sel col1 where upper(col1) (cs) = lower(col1);


This works by converting the alpha characters to uppercase (left side) and lowercase (right side) and then doing a casespecific comparison. If the two sides are not equal (for a particular row), then you know column1 does not contain pure numerics (e.g. digits 0 through 9).



     
  <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