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: Help: a sql question

Re: Help: a sql question

From: Daniel Morgan <dmorgan_at_exesolutions.com>
Date: Thu, 15 Aug 2002 20:07:43 GMT
Message-ID: <3D5C0A0A.62D195D6@exesolutions.com>


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

Original text of this message

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