Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: select non-alpha

Re: select non-alpha

From: John Russell <netnews4_at_johnrussell.mailshell.com>
Date: Thu, 12 Dec 2002 06:28:28 GMT
Message-ID: <tragvu83lhf9nk54ph7qvc3djkcur07a0s@4ax.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US