且构网

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

修剪字符串中的空格 - LTRIM RTRIM 不起作用

更新时间:2023-02-06 10:52:06

我怀疑,名称列中的一些不可读(非 ascii 字符)可能不会作为 TRIM 的一部分被删除电话.

I suspect, some non readable(Non-ascii characters) inside the name column, that might not get removed as part of TRIM calls.

select convert(varbinary, Name) from table

读取上述查询的 HEX 输出应该显示相同的内容.

Reading the HEX output from above query should reveal the same.

请阅读这篇以了解如何编写函数删除这些字符.

Kindly read this to find how to write functions to remove such characters.