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: Inserting a value that has an apostrophe in it....

Re: Inserting a value that has an apostrophe in it....

From: <mundayb_at_my-deja.com>
Date: Fri, 02 Feb 2001 00:58:39 GMT
Message-ID: <95d0nr$p5t$1@nnrp1.deja.com>

In article <95d0dk$jv9$1_at_news3.cadvision.com>,   "Jeff Boyer" <jdboyer@(remove)icomproductions.ca> wrote:
> Can anyone tell me how to get around the error that occurs when an
 value
> being inserted into a field has an apostrophe in it. The SQL insert
> statement thinks the apostrophe is the end of the statement and
 crashes.
>
> Ex. INSERT INTO EMP (EmpName) VALUES ('Jeff's Name');
>
> It doesn't like the apostrophe in "Jeff's"
>
> Thanks
>
> Jeff
>
>

Oh the joy's of apostrophes. You'll need to have 2 apostrophes to resplve to a single one in an inserted field (in fact any time you need to do anything with apostrophes). So try: INSERT INTO EMP (EmpName) VALUES ('Jeff''s Name');

Hope this helps

Bryan

Sent via Deja.com
http://www.deja.com/ Received on Thu Feb 01 2001 - 18:58:39 CST

Original text of this message

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