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: How does one escape special characters

Re: How does one escape special characters

From: Mladen Gogala <mgogala_at_allegientsystems.com>
Date: Mon, 24 Jan 2005 22:00:30 -0500
Message-ID: <41F5B64E.50000@allegientsystems.com>


Roger Xu wrote:

>
>How do I do it if I want to build the SQL first in a variable for a PL/SQL statement?
>
>
>cmd:='SELECT' || l_column || 'FROM emp WHERE name LIKE '% O/'REAR' ESCAPE '/';
>
>

What are you to do with the forward slash? Slay the engine? Roger, the RDBMS slayer? Here it is, right from the manual:

cmd:='SELECT' || l_column || 'FROM emp WHERE name LIKE '% O''REAR';

It's from the SQL reference, section called "text literals".

-- 
Mladen Gogala
Oracle DBA

--
http://www.freelists.org/webpage/oracle-l
Received on Mon Jan 24 2005 - 22:03:02 CST

Original text of this message

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