Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Help: a sql question
Joe Bayer wrote:
> Guy,
>
> We have a table, col1 is varchar2
>
> SQL> select * from test;
>
> phone_no
> ----------
> 2158983309
> 4125689834
> 301A3458793
> 718834T4325
>
> How can I find those bad records which contains non unmber?
>
>
>
> --
> Sent by joebayerii from hotmail within area com
> This is a spam protected message. Please answer with reference header.
> Posted via http://www.usenet-replayer.com/cgi/content/new
Based on your example I'd start with:
SELECT phone_no
FROM table
WHERE LENGTH(phone_no) != 10;
Does this solve the problem or are there letters mixed into those that are the correct length too?
Daniel Morgan Received on Thu Aug 15 2002 - 15:07:43 CDT
![]() |
![]() |