且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

T-SQL,删除字符串中的空格

更新时间:2023-02-03 20:01:01

按以下方式测试.

select unicode(substring('18 286.74', 3, 1))

如果代码返回 32 那么它是一个空格,如果不是,它是一个不同的 Unicode 字符,你的替换 ' ' 将不起作用.

If the code returns 32 then it's a space, if not, it's a different Unicode character and your replace ' ' won't work.