Remove dots and commas from column values

后端 未结 2 1632
Happy的楠姐
Happy的楠姐 2020-12-17 14:46

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

相关标签:
2条回答
  • 2020-12-17 15:02

    In SQL SERVER you could use REPLACE.

    SELECT REPLACE(REPLACE('abc,123.456', ',', ''), '.', '')
    
    0 讨论(0)
  • 2020-12-17 15:06

    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') 
    
    0 讨论(0)
提交回复
热议问题