November 21, 2006 at 12:41 pm
Hello,
I have a weird character in my data and I am wondering what that character is and how can I eliminate that character.
123456
When I copy and paste the above value from the enterprise manager its having two spaces after 123456 and my cursor goes to the next line.
So whn I hit backspace button 3 times i am getting the correct string. when I checked the length of the string it shows me 8.
So how can eliminate those two weird characters at the end of the string.I have this problem for all the values in that column.
Thanks.
November 21, 2006 at 12:46 pm
Does this help?
DECLARE @s AS VARCHAR(10)
SET @s = ' 123456 ' + CHAR(13) + CHAR(10)
PRINT @s + 'line fed'
SET @s = REPLACE(REPLACE(@s, CHAR(13), ''), CHAR(10), '')
PRINT @s + 'line UNfed'
November 21, 2006 at 1:06 pm
It worked like a dream.
Thanks for saving my day.
November 21, 2006 at 1:16 pm
Happy to help .
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply