Remove periods and commas from column values

I am using SQL Server 2008

I transferred some data from MySql; Data migration was successful, but some values ​​contain data with periods and commas.

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

+7
source share
2 answers

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

in the following way

replace('Your String','charater you want to replace','with what') stuff('Your String',position,count,'data') 
+12
source

In SQL SERVER, you can use REPLACE.

 SELECT REPLACE(REPLACE('abc,123.456', ',', ''), '.', '') 
+5
source

All Articles