[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

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

Posted on 2016-09-09
2
Medium Priority
?
86 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 27

Accepted Solution

by:
Shaun Kline earned 2000 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

Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

Question has a verified solution.

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

When trying to connect from SSMS v17.x to a SQL Server Integration Services 2016 instance or previous version, you get the error “Connecting to the Integration Services service on the computer failed with the following error: 'The specified service …
Ready to get certified? Check out some courses that help you prepare for third-party exams.
Viewers will learn how the fundamental information of how to create a table.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

656 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