Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Filtering for only numbers in a varchar2 field
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