我正在使用SQL Server 2008
我从MySql迁移了一些数据;数据迁移成功,但是某些值包含带点和逗号的数据。
从我的数据中删除这些字符的最佳方法是什么?
在SQL Server中,您可以使用REPLACE删除数据,并可以使用STUFF添加数据
如下
replace('Your String','charater you want to replace','with what')
stuff('Your String',position,count,'data')
在SQL SERVER中,您可以使用REPLACE。
SELECT REPLACE(REPLACE('abc,123.456', ',', ''), '.', '')