Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Update Query With Escape Character

$
0
0

Hi, 

I am using sql server 2008 R2 and I am trying  to update my column which contains single quote ( ' ). I want to replace this single quote with white space.

I am trying it with escape character which is again single quote.

ie.

update zx set location = replace(location,'''',' ')

but it gives me an error : 

Msg 8152, Level 16, State 14, Line 2
String or binary data would be truncated.
The statement has been terminated.

any kind of help would be appreciable. Thanks a lot in advance


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>