Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 19 May 2008 @ 21:20:45 GMT


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


Subj:   Re: Filter and convert alphanumeric data to numeric data
 
From:   Geoffrey Rommel

First, I would discourage using upper vs. lower to test for numeric. Upper('!#$') = lower('!#$'), but that's not numeric.

Now, about the results you're seeing. Consider this:

     select type('1234');

     VARCHAR(4) CHARACTER SET UNICODE

     select type( lower('1234') );

     VARCHAR(4)

     select type( upper('1234') );

     VARCHAR(4) CHARACTER SET UNICODE

This explains why the char2hexint results are different, but it seems odd that lower('1234') would be Latin when the input string is Unicode. Nevertheless, they will compare as equal.

There is no built-in function to test for numeric; you must provide your own or use one of the methods suggested by others.



     
  <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