Skip to content
Advertisement

LTRIM RTRIM not working for Chinese string SQL

I have a column named Text which receives from the end user the following string:

'复合模头滤网 φ245 120目*300目 24×120目 '

Which includes a weird space, kind of larger than the regular space, at the end. However it has the same ASCII code as the normal space 32.

I used this SQL code to trim my string but always returning same string without trimming !!!!

Advertisement

Answer

The solution is to try trim the the character with the ASCII code 32. The following code works perfectly:

To check it out if works , I tried it this way :

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement