日期:2014-05-18 浏览次数:20497 次
replace(replace(Col,'.',''),'-','')
------解决方案--------------------
replace(replace(col,'-',''),'.','')
------解决方案--------------------
use Tempdb go --> --> if not object_id(N'Tempdb..#T') is null drop table #T Go Create table #T([数据] nvarchar(11)) Insert #T select N'123-456.789' union all select N'147-2833.13' union all select N'17-273.2378' Go Select replace(replace([数据],'.',''),'-','') from #T /* 123456789 147283313 172732378*/
------解决方案--------------------
select replace(replace(数据,'.',''),'-','')