Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Looking for fields that contain % or _
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