Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle isalpha() function?
Pierre Charpenay schrieb:
>
> Another way is to use the (nls_)upper and (nls_)lower functions.
> That is, if UPPER(c) is not equal to LOWER(c) then c is alphabetic, else, it
> is not !
I'm afraid that's not general enough - the original question referred explicitly to characters alphabetic in the current locale.
My setting for NLS_LANG is german_germany.we8iso8859p1, and the following SQL-Statement returns two identical 'ASCII' values, which would make the character 'ß' non-alphabetic (that's the ISO character 'LATIN SMALL LETTER SHARP S', which looks a bit like a lowercase beta). Since there is no uppercase 'ß', nls_upper and nls_lower both return the same value for 'ß' (same for upper and lower without the nls).
SQL> select ascii(nls_upper('ß')), ascii(nls_lower('ß')) from dual;
ASCII(NLS_UPPER('ß')) ASCII(NLS_LOWER('ß'))
--------------------- --------------------- 223 223
Martin
PS My opinions, not my company's
--
Dr. Martin Ameskamp, AED Graphics AG
Mallwitzstr. 1-3, 53177 Bonn
Tel. 0228/9542-0, Fax 0228/9542-111
Email: ameskamp_at_aed-graphics.de
Received on Fri Nov 26 1999 - 01:19:51 CST