| 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.
Hi Alan,
To put a ' (single quote), use two '' together.
Example (basic but you get the drift):
SQL> declare
2 v_string varchar2(100);
3 begin
4 v_string := 'This contains a '' and one over here as well '' ';
5 dbms_output.put_line(v_string);
6 end;
7 /
This contains a ' and one over here as well '
PL/SQL procedure successfully completed.
Cheers
Richard
"Alan" <desertflowerln_at_yahoo.com> wrote in message
news:b1217045.0211151422.3c28736a_at_posting.google.com...
> 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 - 18:35:52 CST
![]() |
![]() |