473,473 Members | 2,316 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to query a string containing an apostrophe ?

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
Jul 19 '05 #1
1 10674
Hi again,

It was my mistake. I did the query without the uppercase on the first
letter. I corrected it and it works fine.
please disregard the previous post.

JBF.
"news" <jb*******@multicorpora.ca> wrote in message
news:SG********************@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

Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

29
by: shank | last post by:
1) I'm getting this error: Syntax error (missing operator) in query expression on the below statement. Can I get some advice. 2) I searched ASPFAQ and came up blank. Where can find the "rules"...
13
by: John young | last post by:
I have been looking for an answer to a problem and have found this group and hope you can assist . I have been re doing a data base I have made for a car club I am with and have been trying to...
6
by: sheree | last post by:
I would like to create a query where one of the columns of the queries comes from a combo list box on a form. For example, if my table has the following fields: id name interest1 interest2...
12
by: Jeff S | last post by:
In a VB.NET code behind module, I build a string for a link that points to a JavaScript function. The two lines of code below show what is relevant. PopupLink = "javascript:PopUpWindow(" &...
2
by: herlihyboy | last post by:
I have searched and can't find any articles pertaining to this issue... I am filling a dataset using a SqlDataAdapter that was instantiated with a SqlCommand object. When the Fill method is...
2
by: Tom | last post by:
Hi, I have some kind of problems with an apostrophe character ('). I would like to select from DataTable DataRow containing value horses' (with an apostrophe on the end). But when I do it in an...
0
sashi
by: sashi | last post by:
Apostrophe Have you ever tried to send a string variable to MS Access that had apostrophes embedded within an SQL Statement? If YES you will get a run time ERROR. Here is your solution, a function...
1
by: news | last post by:
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...
11
by: bcurtu | last post by:
Hi, I have a BIIIIIG problem with the next query: cursor.execute(""" SELECT titem.object_id, titem.tag_id FROM tagging_taggeditem titem WHERE titem.object_id IN (%s) """,( eid_list))
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.