Double it up:
update response_op_bk_1
set response = 'Call Jeff'
where response = 'Call Jeff''s cell'
and responsenumber = '1'
-----Original Message-----
From: Carl
[mailto:mssqldba-ezmlmshield-x30014409.[Email address protected]
Sent: Tuesday, June 28, 2005 11:54 AM
To: LazyDBA Discussion
Subject: Defeat Single Quotation in a string
Hello all,
I need to defeat a single quotation that is in a where clause to
update a table, anyone have any suggestions SQL thinks that the single
quotation mark after Jeff is the end of the string value. See sample of
code below.
update response_op_bk_1
set response = 'Call Jeff'
where response = 'Call Jeff's cell'
and responsenumber = '1'
Thanks in advance...
Carl Phillips
Regions Bank
I.S. Engineer
PMPM Level II Support
W 334-956-6169
C 334-799-8632
800-272-2867
--------------------------------------------
This e-mail and any files transmitted with it are the property of
Regions Financial and/or its affiliates, are confidential, and are
intended solely for the use of the individual or entity to whom
this e-mail is addressed. If you are not one of the named
recipient(s) or otherwise have reason to believe that you have
received this message in error, please delete this message
immediately from your computer. Any other use, retention,
dissemination, forwarding, printing, or copying of this e-mail
is strictly prohibited.
---------------------------------------------------------------------
TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
Website : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
MS Sql Server LazyDBA home page