Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How can i store and retrieve strings with ' (Single quote) ??
To escape the & character in SQL*Plus, you're better off setting
SQL> set scan off
This will stop SQL*Plus hunting for ampersands.
-- Karl Oracle Certified DBA Leonid Lamburt wrote in message <01bd04de$c5da70c0$0d87c584_at_buggs>...Received on Mon Dec 15 1997 - 00:00:00 CST
>It doesn't escape the & character:
>
>select 'Johnson '& Johnson' from dual;
>
>Ian Cary <cary_at_gatwick.geco-prakla.slb.com> wrote in article
><3487F9A4.4D27E23B_at_gatwick.geco-prakla.slb.com>...
>> Bharat Yarlagadda wrote:
>>
>> > Is there an escape char. that i can use to escape a ' in strings while
>> > storing the data. If there is any other way one could store and
retrieve
>> > a single quote (') in varchar2 data type columns.
>>
>> Yes. it is the ' itself eg.
>>
>> insert into taba(varch_fld) values ('I''ve got a quote in!')
>>
>> Cheers,
>>
>> Ian
>>
>>
>>