Remove Dots and Commas from Column Values

I am using SQL Server 2008

I migrated some data from MySql; the migration of data was successful but some values contain data with dots and commas.

What is the best way to remove these characters from my data?

2 Answers

in sql server you can use REPLACE for remove data and STUFF to add data

as follows

replace('Your String','charater you want to replace','with what')


stuff('Your String',position,count,'data') 

In SQL SERVER you could use REPLACE.

SELECT REPLACE(REPLACE('abc,123.456', ',', ''), '.', '')

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Sophia Al-Mansoor

Sophia Al-Mansoor

Global Business & E-Commerce Reporter

Sophia analyzes international trade, startup ecosystems, retail transformation, and supply chain logistics for modern digital publications.

Share this article
Twitter Facebook Pinterest