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: inserting a ' (apostrophe) in a table

Re: inserting a ' (apostrophe) in a table

From: Niall McPhillips <nmcp[nospam>
Date: Wed, 18 Nov 1998 11:25:11 +0100
Message-ID: <MPG.10bcbef525d9ae92989682@news.iprolink.ch>


Subject: Re: inserting a ' (apostrophe) in a table From: nmcp[nospam]@s-and-a.com (Niall McPhillips)

Hi,

You can make it easy on yourself by using the chr() builtin function. Beats trying to remember whether you need 2,3 or 4 apostrophes.

The ascii code for an apostrophe is 39 (decimal)

So you just need to use chr(39) in the insert statement whenever you need an apostrophe.

For example, to insert O'Neill try

   insert into my_table values ('O' ¦¦ chr(39) ¦¦ 'Neill');

Hope this Helps.
Niall.

In article <vF042.211$k25.361_at_pm01nn>, you say...
> Hi! I need to know how to insert a ' into a table field... i've tried
> using a double and it didn't work... any hints?
>
>
>
>

--

Note: remove [nospam] from e-mail address for correct address



Niall McPhillips
Stephenson and Associates
chemin des Coquelicots 20
1214 Vernier-Geneva
Switzerland.
Tel: 	+41 (22) 341.5001
Fax: 	+41 (22) 341.5004

e-mail: nmcp[nospam]@s-and-a.com
Web: http://www.s-and-a.com Received on Wed Nov 18 1998 - 04:25:11 CST

Original text of this message

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