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

Home -> Community -> Usenet -> c.d.o.misc -> Inserting strings containing apostrophes

Inserting strings containing apostrophes

From: Darryl <darryl_at_nospam.com>
Date: Wed, 29 Aug 2001 14:09:46 -0400
Message-ID: <9mjatc$i3c$1@news.ilink.net>


I'm using 8.1.7 Enterprise.

The following insert statement fails because of the apostrophe after the word ticket:

        INSERT INTO TABLE ( VARCHAR2 column ) VALUES ('ticket's required');

I can get around it by adding an extra apostrophe:

        INSERT INTO TABLE ( VARCHAR2 column ) VALUES ('ticket''s required');

and the insert works. But that's not a workable solution for what I'm doing.

Anybody have other ideas, like surrounding the string with escape characters, quotes, etc. I've tried several ways and can't get anything to work.

Thanks,
Darryl Received on Wed Aug 29 2001 - 13:09:46 CDT

Original text of this message

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