Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> How does one escape special characters
Hello list,
I would use the following SQL to search for someone whose last name is O'REAR in sqlplus.
SELECT * FROM emp WHERE name LIKE '% O/'REAR' ESCAPE '/';
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 '/';
--This gives me an error.
Thanks,
Roger
This e-mail is intended solely for the person or entity to which it is addressed and may contain confidential and/or privileged information. Any review, dissemination, copying, printing or other use of this e-mail by persons or entities other than the addressee is prohibited. If you have received this e-mail in error, please contact the sender immediately and delete the material.
![]() |
![]() |