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: Terje Tysse <diltert_at_NOSPAMhotmail.com>
Date: Fri, 01 Mar 2002 22:07:43 GMT
Message-ID: <uluv7ug3m4246otj8ijsqt7o3ipqs4j84i@4ax.com>


On 1 Mar 2002 06:34:19 -0800, jholakowski_at_nielsenco.com (Jeff Holakowski) wrote:

>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

Well, it works for me :

C012HOME:orcl>create table test_tab ( a varchar2(10)) ;

C012HOME:orcl>insert into test_tab values ( 'xxxx01xxxx' ) ;

C012HOME:orcl>select * from test_tab where a like '____01____' ;

A



xxxx01xxxx

This indicates maybe that there are some other error in your query?

Regards,
Terje Tysse Received on Fri Mar 01 2002 - 16:07:43 CST

Original text of this message

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