Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: get a single quote in PL/SQL stmt.
Use two consecutive single quotes to represent one single quote
character in your quoted string
DBMS_OUTPUT.put_line ('ALTER DATABASE BACKUP CONTROLFILE TO ''' || backup_location || '''');
hth
Martin Doherty
Alan wrote:
>I am trying to put a ' (single quote) in my PL/SQL statement, but
>couldn't figure out the exact syntax. Here is an example:
>
>DBMS_OUTPUT.put_line ('ALTER DATABASE BACKUP CONTROLFILE TO ' ??? ||
>backup_location || ???);
>
>in above stmt, backup_location is predefined, e.g.
>d:\oracle\oradata\bu_ctrl.ctl. But I need a single quote around this
>value. What should I put in in the ??? area?
>Any suggestios?
>
>Thanks
>Alan
>
>
Received on Fri Nov 15 2002 - 16:28:44 CST