Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Oracle wildcard search on alphanumeric fields
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
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