Archives of the TeradataForum
Message Posted: Wed, 16 Jun 2004 @ 15:55:04 GMT
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).
|