Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: apostrophe in Oracle field
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