Archives of the TeradataForum
Message Posted: Mon, 19 May 2008 @ 21:20:45 GMT
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.
|