Solved

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

Posted on 2016-09-09
2
80 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

705 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