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: How can i store and retrieve strings with ' (Single quote) ??

Re: How can i store and retrieve strings with ' (Single quote) ??

From: Karl E. Jørgensen <kjorg_at_msn.com>
Date: 1997/12/15
Message-ID: <#s00llSC9GA.275@upnetnews04>#1/1

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>...

>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
>>
>>
>>
Received on Mon Dec 15 1997 - 00:00:00 CST

Original text of this message

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