Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Oracle wildcard search on alphanumeric fields

Re: Oracle wildcard search on alphanumeric fields

From: Bricklen Anderson <bricklen13_at_hotmail.com>
Date: 1 Mar 2002 10:12:32 -0800
Message-ID: <b416ca2d.0203011012.18cd3821@posting.google.com>


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

Original text of this message

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