Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Access SQL Escape character??

420 views
Skip to first unread message

Darran Potter

unread,
Dec 2, 1997, 3:00:00 AM12/2/97
to

According the SQL syntax you can escape ' and " by using the #
symbol... eg

SELECT * FROM mytable WHERE name='phil mc#'cavity'

Only access complains about missing symbols,....
Does access not allow escapes

John L. Viescas

unread,
Dec 2, 1997, 3:00:00 AM12/2/97
to

Darran-

You have to construct the predicate using either "opposite" quote marks as
delimiters or by entering the quote twice in the string. For your example,
the following are legal in Access:

WHERE name='phil mc''cavity'

WHERE name="phil mc'cavity"

Good luck...
--
John Viescas
author, "Running Microsoft Access 97"
http://www.amazon.com/exec/obidos/ISBN=1572313234/

Darran Potter <wa...@globalnet.co.ukNOSPAM> wrote in article
<eHQabUw$8GA...@uppssnewspub05.moswest.msn.net>...

Darran Potter

unread,
Dec 3, 1997, 3:00:00 AM12/3/97
to

Thanks

I wish MS SQL was a bit more "standard"...


John L. Viescas wrote in message
<01bcff3e$456910e0$0f94ffd0@jv-power--puter>...

0 new messages