How to query a string containing an apostrophe ?
From: news <jbfidelia_at_multicorpora.ca>
Date: Tue, 9 Sep 2003 10:49:38 -0600
Message-ID: <SGl7b.36039$yg2.665188_at_weber.videotron.net>
Date: Tue, 9 Sep 2003 10:49:38 -0600
Message-ID: <SGl7b.36039$yg2.665188_at_weber.videotron.net>
Hi there,
I have a table in an Oracle 9i R2 database containing the following string"
"It's so easy"
When I try to execute the following query: SELECT EXPRESSION FROM EXPRESSIONS WHERE EXPRESSION = "It's so easy"
I recieve an error:
ORA-01740-Missing double quote in identifier
I tried to correct the query with a double quote: SELECT EXPRESSION FROM EXPRESSIONS WHERE EXPRESSION = "It''s so easy"
then the query return empty.
Is there something I'm doing wrong ?
The definition of the table is
CREATE TABLE EXPRESSIONS
(
ID NUMBER(8) NOT NULL, EXPRESSION_IDXED NVARCHAR2(500) NULL, CREATEDATE DATE NULL, CREATEBY NVARCHAR2(20) NULL,)
Thanks for your help.
JBF Received on Tue Sep 09 2003 - 18:49:38 CEST