Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: select non-alpha
On Thu, 12 Dec 2002 00:20:46 GMT, damorgan <damorgan_at_exesolutions.com>
wrote:
>Pucko wrote:
>
>> How to write sql /plsql to select all (rows)varchar that does NOT contain
>> A-Z or a-z
>>
>> /pucko
>
>Work SELECT TRANSLATE(UPPER(field), '2ABCDEFGHIJKLMNOPQRSTUVWXYZ', '2')
>
>into your code and see if the length of the string changes.
How about WHERE UPPER(field) = LOWER(field)? If any letter that is affected by UPPER or LOWER is in the field (i.e. a-z, A-Z), the comparison will fail and the row won't match. The question of how this applies to accented letters is left as an exercise for the reader. :-)
John Received on Thu Dec 12 2002 - 00:28:28 CST