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: Question on how to mask characters in SQL ???

Re: Question on how to mask characters in SQL ???

From: Paul Newcomb <pen_at_swl.msd.ray.com>
Date: Wed, 12 Aug 1998 15:35:23 -0400
Message-ID: <35D1EE7B.87A124EA@swl.msd.ray.com>


Michael Maretzke wrote:

> Hello there !
>
> I'm using a Oracle RDBMS and have a little problem. I know that some
> Characters are reserved characters in SQL. Inserting them into a
> CHAR-attribute in a table is no problem because they're masked
> by the single quoting marks ('). After inserting them ... how to
> select them from the table ?
> Using "SELECT * FROM table WHERE zzz = 'Test%Test';" works realy fine.
> But
> how can I select these lines using the LIKE condition ?
>
> "SELECT * FROM table WHERE zzz like '%%%';" doesn't work. I wanted
> to select all rows containing a % in attribute ZZZ ...
>
> Any suggestions ?
>
> Any tips on where to get these informations in Oracle docu ;)) ???
>
> CU Michael.

  Hi - try this :

select * from table where zzz like '%e%%' escape 'e'

Paul Newcomb Received on Wed Aug 12 1998 - 14:35:23 CDT

Original text of this message

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