Re: How does one escape special characters

  • From: Mladen Gogala <mgogala@xxxxxxxxxxxxxxxxxxxx>
  • To: roger_xu@xxxxxxxxxxx
  • Date: Mon, 24 Jan 2005 22:00:30 -0500

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

--
//www.freelists.org/webpage/oracle-l

Other related posts: