Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: get a single quote in PL/SQL stmt.

Re: get a single quote in PL/SQL stmt.

From: Martin Doherty <martin.doherty_at_elcaro.moc>
Date: Fri, 15 Nov 2002 14:28:44 -0800
Message-ID: <kCeB9.9$GH3.79@news.oracle.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US