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. ____________________________________________________________________ This email has been scanned for all viruses by the MessageLabs Email Security System. Any questions please call 972-721-8257 or email your request to tech_support@xxxxxxxxxxxx -- //www.freelists.org/webpage/oracle-l