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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Re: How to search for %

RE: Re: How to search for %

From: Gunawan Yuwono <gunawan.yuwono_at_webbox.com>
Date: Wed, 18 Oct 2000 15:47:56 -0700
Message-Id: <10653.119724@fatcity.com>


Use escape clause:
select * from test where a like '%\%%' escape '\';

HTP. Gunawan Yuwono
Oracle DBA
Kansas City, MO

>--- Original Message ---
>From: Malik Michael <mmalyk_at_cryptologic.com>
>To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com>
>Date: 10/18/00 10:55:22 PM
>

>Hi John .
>
>Could you try this query:
>
>SELECT * FROM test WHERE INSTR(a,'%') > 0;
>
>I hope you can receive right result.
>
>Michael Malyk
>Cryptologic Inc.
>mmalyk_at_cryptologic.com
>
>
>"Shaw, John B" wrote:
>
>> I need to find a '%' in char field (8.05) and I can't seem
to figure out the
>> right sql to get it - the following are what I've tried so
far (\ is the
>> escape).
>>
>> SQL> select * from test where a like '\%';
>> A
>> -----
>> ab%cd
>> abcd
>> efgab
>>
>> SQL> select * from test where a like '%\%%';
>> A
>> -----
>> ab%cd
>> abcd
>> efgab
>>
>> SQL> select * from test where a like '%\%';
>> A
>> -----
>> ab%cd
>> abcd
>> efgab
>>
>> SQL> select * from test where a like '\%%';
>> A
>> -----
>> ab%cd
>> abcd
>> efgab
>>
>> .... . .-.. .--. .. ...- . -... . . -. .--. .-. --- -...
. -..
>> John B. Shaw
>> Intergraph Public Safety
>> mailstop LR24A4
>> jbshaw_at_ingr.com
>> 256-730-8038
>> All the usual disclaimers and some of the certifications
>> --
>> Please see the official ORACLE-L FAQ: http://www.orafaq.com
>> --
>> Author: Shaw, John B
>> INET: jbshaw_at_ingr.com
>>
>> Fat City Network Services -- (858) 538-5051 FAX: (858)
538-5051
>> San Diego, California -- Public Internet access / Mailing
Lists
>> --------------------------------------------------------------------
>> To REMOVE yourself from this mailing list, send an E-Mail
message
>> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru')
and in
>> the message BODY, include a line containing: UNSUB ORACLE-L
>> (or the name of mailing list you want to be removed from).
 You may
>> also send the HELP command for other information (like subscribing).
>
>--
>Please see the official ORACLE-L FAQ: http://www.orafaq.com
>--
>Author: Malik Michael
> INET: mmalyk_at_cryptologic.com
>
>Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
>San Diego, California -- Public Internet access / Mailing
Lists
>--------------------------------------------------------------------
>To REMOVE yourself from this mailing list, send an E-Mail message
>to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru')
and in
>the message BODY, include a line containing: UNSUB ORACLE-L
>(or the name of mailing list you want to be removed from).
You may
>also send the HELP command for other information (like subscribing).
>
>



Sent from a WebBox - http://www.webbox.com Received on Wed Oct 18 2000 - 17:47:56 CDT

Original text of this message

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