Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Oracle wildcard search on alphanumeric fields
how about instr or substr?
select * from ... where substr(colname,4,2) like '01';
or you could get fancy and start nesting substrings and instrings to get different values from the string, at potentially different places in the said string.
Bricklen
jholakowski_at_nielsenco.com (Jeff Holakowski) wrote in message news:<7493f3fd.0203010634.1abfc359_at_posting.google.com>...
> I tried using '%01%' already, but there could be a combination like
> v010102 or b030101, where I would like to capture only 01 at positions
> 4 & 5.
>
> damorgan <dan.morgan_at_ci.seattle.wa.us> wrote in message news:<3C7EAA56.2F5E9B4C_at_ci.seattle.wa.us>...
> > '%01%'
> >
> > Daniel Morgan
> >
> >
> >
> > Jeff Holakowski wrote:
> >
> > > Hi,
> > >
> > > I am trying to get a list of values in an alphanumeric field and I'm
> > > having trouble using the '%' and '_' characters. I would like to get a
> > > listing where all values in "xxx01xx" are displayed (x being
> > > variable). I've used "where location like '___01__' but this returns
> > > no rows. Any suggestions?
> > >
> > > Thanks
Received on Fri Mar 01 2002 - 12:12:32 CST