Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: How does one escape special characters
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-lReceived on Mon Jan 24 2005 - 22:03:02 CST
![]() |
![]() |