Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Question on how to mask characters in SQL ???
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