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: Filtering for only numbers in a varchar2 field

Re: Filtering for only numbers in a varchar2 field

From: Scott Mattes <ScottMattes_at_yahoo.com>
Date: Fri, 29 Mar 2002 18:22:26 GMT
Message-ID: <Ch2p8.6862$SG2.603290@news1.news.adelphia.net>


how about

select *
from table
where substr( field, 1, 3 ) between 0 and 999;

"damorgan" <damorgan_at_exesolutions.com> wrote in message news:3CA49BF1.4C6BE862_at_exesolutions.com...
> Without examples of the possible values in the field, and what you want
> to filter out any answer will likely be incorrect.
>
> Daniel Morgan
>
>
>
> Ryan Gaffuri wrote:
>
> > I have a varchar2 field.. I need the first 3 digits(I know I need a
> > substr) to be only numbers so I can do a min(to_number) function on
> > it. My numbers will mainly be in the form 1.1(etc...), but not all.
> >
> > How do I filter out all other values?
>
Received on Fri Mar 29 2002 - 12:22:26 CST

Original text of this message

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