Solved

replace character in column with the unicode characters .. Only help with the syntax

Posted on 2016-09-09
2
62 Views
Last Modified: 2016-09-09
I have two update scripts below, the first one works fine, but the second one is to replace an apostrophe with the unicode characters. I get an error on the second one, I assume the syntax is incorrect, can I get help with that ?

UPDATE dbo.CatalogDocuments
Set    Document = replace(Document, '"', '"')
WHERE Document IS NOT NULL AND Document <> ''


UPDATE dbo.CatalogDocuments
Set    Document = replace(Document, "'", '&apos;')
WHERE Document IS NOT NULL AND Document <> ''

Open in new window

0
Comment
Question by:amucinobluedot
2 Comments
 
LVL 26

Accepted Solution

by:
Shaun Kline earned 500 total points
ID: 41791807
UPDATE dbo.CatalogDocuments
Set    Document = replace(Document, '''', '&apos;')
WHERE Document IS NOT NULL AND Document <> ''

Open in new window

0
 

Author Closing Comment

by:amucinobluedot
ID: 41791810
Great thanks !
0

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
best counters for cpu high usage 3 33
transaction in asp.net, sql server 6 33
performance query 4 24
access query to sql server 3 21
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
The viewer will learn how to dynamically set the form action using jQuery.
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question