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: escape character???

Re: escape character???

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Sat, 26 Dec 1998 22:40:16 +0100
Message-ID: <368557C0.A14A1316@sybrandb.demon.nl>


Quotes need to be doubled in sql*plus.
The condition should read
'be in (''1'',''2'')'
This should do the trick

Hth,

Sybrand Bakker, Oracle DBA

Zhao Fu wrote:

> I am inserting a string which contains single quotation marks to a
> VARCHAR2 type column, the string is like 'be in('1','2')'
>
> In SQL*PLUS, I set the escape character to '\', so my SQL statement is
> like this:
>
> insert into test_a_spec
> (action,condition)
> values('be', 'be in (\'1\',\'2\')');
>
> But I still got the error:
>
> 'be in ('1','2')'
> *
> ERROR at line 4:
> ORA-00917: missing comma
>
> Could anyone point me a direction to solve the problem?
>
> Thank you in advance.
> --
> Zhao Fu


Received on Sat Dec 26 1998 - 15:40:16 CST

Original text of this message

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