473,397 Members | 1,972 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

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 10671
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
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.