Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I deal with punctuation after a WHERE part of a query? 2

Status
Not open for further replies.

mage

Programmer
Jul 17, 2001
7
ZA
Say I have a Query:
SELECT id FROM Students WHERE (Sponsor='markham's')
The middle appostrophy causes a cut off and error in the query in Access. How do I deal with such problems?
 

Two ways to handle problem. I prefer the 1st way in Access.

Use double quotes to delimit text.
SELECT id FROM Students WHERE (Sponsor="markham's")

Use two consecutive single quotes to represent one in a string.
SELECT id FROM Students WHERE (Sponsor='markham''s')

Terry Broadbent
Please review faq183-874.

"The greatest obstacle to discovery is not ignorance -- it is the illusion of knowledge." - Daniel J Boorstin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top