Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Removing Registered Trademark SQL

I have a data set example here:

ShipName
FedEx International Economy®
FedEx Ground®
FedEx® International Connect Plus
FedEx International Priority®
FEDEX® INTERNATIONAL CONNECT PLUS
FedEx International Priority®
FEDEX INTERNATIONAL PRIORITY®

Yet, I want to remove all the special characters, so I can group them together appropriately. I realize I could just use UPPER(), however I need to remove them either way.

Because some of the characters are not on either end of the string, a simple Right() or Left() would not work.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

It should be as simple as using the replace function on your column:

select ShipName = replace(ShipName, '®', '')
  from Shipping

SQL Fiddle: http://sqlfiddle.com/#!18/6f4d2/1

Further reading: https://learn.microsoft.com/en-us/sql/t-sql/functions/replace-transact-sql?view=sql-server-ver16

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading