Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: character checking
"Daniel" <test_at_test.com> a écrit dans le message de
news:40f7a9e9$0$6440$ed9e5944_at_reading.news.pipex.net...
> Hi.
>
> Oracle 8i, 8.1.7.4
>
> Using Sqlplus I am looking for a way to check for non alpha numeric
> characters in a column.
>
> Up to now I have been checking for just one or two characters using the
> INSTR function.
>
> select text
> from table
> where INSTR(text, '&' ,1 ,1) >= 1;
>
> select text
> from table
> where INSTR(text, '+' ,1 ,1) >= 1;
>
> But I'm wondering if there is a better way than to check for each character?
>
> Many thanks,
>
> --
> Daniel
>
>
select text from table
where length(replace(text,'A0123456789','A')) > 0
/
-- Regards Michel CadotReceived on Fri Jul 16 2004 - 06:52:26 CDT