The ltrim/rtirm cannot remove the space of data?

Today, I met one strange problem; when the following T-SQL statement was executed, the desired result was not presented:

What happened to the ltrim and rtrim, I copied the value of '105151 ' and then verify the rtrim by the following statement:

The function works well. So where is the problem? I used the Google to search the relevant topic, I found one post at the http://social.msdn.microsoft.com/Forums/en-US/transactsql/thread/ed5d3d85-a276-4487-be05-0a5c06f82722

And yes, it's the problem. I executed the following T-SQL statement and got the following result:

It seems that the last character is the new line, not the space. Now, what need to be done is replace this symbol to space or empty. Thing became simple:

posted @   On the road....  阅读(257)  评论(0编辑  收藏  举报
努力加载评论中...
点击右上角即可分享
微信分享提示