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

Home -> Community -> Usenet -> c.d.o.tools -> Re: apostrophe in Oracle field

Re: apostrophe in Oracle field

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Wed, 25 Apr 2001 00:04:46 +0200
Message-ID: <o1ubet09fug915e22rlv44al4nc2vu4b39@4ax.com>

On Tue, 24 Apr 2001 16:10:01 -0500, Zhiliang Hu <zhu_at_genomicfx.com> wrote:

>
>There must be someone encounterred and have a solution to this problem:
>
>When you have a " ' " (apostrophe) among some text data in a table
>field,
>it causes trouble when you do, for example:
>
>> select * from table where name='O'Brian':
>
>ERROR:
>ORA-01756: quoted string not properly terminated
>
>Any general approach to avoid this?
>
>Thanks in advance!
>
>Zhiliang

Sure..
Such generic problems are adressed in the Sql reference manual. It would have told you you need to escape the single quote with an extra single quote.

Regards,

Sybrand Bakker, Oracle DBA Received on Tue Apr 24 2001 - 17:04:46 CDT

Original text of this message

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