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

Home -> Community -> Usenet -> c.d.o.server -> Re: Looking for fields that contain % or _

Re: Looking for fields that contain % or _

From: Mark Merritt <merritt_at_mail.msen.com>
Date: 1997/03/24
Message-ID: <5h6udt$t1u@ftl.msen.com>#1/1

John Fico (fico_at_worldnet.att.net) wrote:
: I am trying to put a like in my where clause so that I can return
: records that have an _ in a specified field. Because _'s and %'s are
: special characters to the like I don't know how to override.
:
: I've tried %% or __. I've also tried set escape on and using \%.
: niether works. Any help would be greatly appreciated.
:
: John Fico

Forgive my ignorance if I'm missing something here - why not just do:

SQL> select column from table where column like '%\_%' escape '\';

??

/*+
The opinions expressed herein are my own and do not necessarily represent those of Oracle Corporation.
+*/ Received on Mon Mar 24 1997 - 00:00:00 CST

Original text of this message

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