Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 17 Jun 2004 @ 09:30:20 GMT


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


Subj:   Re: How to identify numerics in alphanumerics ?
 
From:   Dennis Calkins

On Wed, 16 Jun 2004 21:13:34 +0530, Pandey, Vivek wrote:

  Is there a way to identify pure numeric out of alpha-numeric data? For e.g. if the below column is char(2) and contains alpha-numeric data do we have a sql function to identify 10,11,12 from bc ?  



Hi,

If you are on v2r5.1 you could write an ISINTEGER UDF and then just use it in your SQL.

sel a from mytable where isinteger(a);


Or take mine; I posted it as an example When 5.1 was first released.

www.teradataforum.com/teradata/20031203_102414.htm


You could modify it to be a full-blown ISNUMERIC function.

-97.67e+3.14

where it supports signs, decimal points, exponential notation and signs and decimal points in the exponential notation, but the simple ISINTEGER version in the post would work for your case.



     
  <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