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: single quote

Re: single quote

From: Happl Oberlin <hanspeter.oberlin_at_gmz.migros.ch>
Date: 1997/10/21
Message-ID: <344C540B.2690@gmz.migros.ch>#1/1

Ong Chin Hui wrote:
>
> Hi, I am using Java and Oracle RDBMS.
>
> When forming the SQL statements for call to Oracle, some statements
> cause error because of existence of single quote in some columns.
>
> Eg. insert into COMPANY values ( 'SAN'ANGLE', ... )
>
> Instead of scanning for single quote, is there any easy way out ?

No, _I_ don't think there is an easy way out.

You _have_ to scan the input an replase the each single qoutes by

   '||chr(39)||'
or by

   '' (two single quotes).

I don't know which one of these is easier in Java.

Please let me know, how you solved your problem finaly.

Happl from Switzerland Received on Tue Oct 21 1997 - 00:00:00 CDT

Original text of this message

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