Archive for category TSQL
LTRIM RTRIM don’t always work –UDF (UPDATED)
Posted by senseicris in Programming, SQL, TSQL on February 17, 2012
I previously posted on the LTRIM and RTRIM inability to remove certain not printing whitespace characters which can sometimes cause problems. I have updated the SQL page with a User Defined Function (UDF) which can be used in queries or in a stored procedure. I have also included a link to the Code Project article.
LTRIM RTRIM don’t work
Posted by senseicris in Programming, SQL, TSQL on September 29, 2011
LTRIM and RTRIM does not work sometimes if the whitespace character is not actually character ASCII 32. This stumped me for a while. The data entry screen used to enter the information somehow allows users to enter other white space characters other than the regular space from the space bar. It could be related to the system encoding, I don’t know. Here is the code I used to fix the LTRIM and RTRM.