SQL Server: How do you remove punctuation from a field?

前端 未结 8 1288
甜味超标
甜味超标 2021-02-05 20:50

Any one know a good way to remove punctuation from a field in SQL Server?

I\'m thinking

UPDATE tblMyTable SET FieldName = REPLACE(REPLACE(REPLACE(FieldNa         


        
8条回答
  •  不思量自难忘°
    2021-02-05 21:21

    I'd wrap it in a simple scalar UDF so all string cleaning is in one place if it's needed again.

    Then you can use it on INSERT too...

提交回复
热议问题