once a friend of mine asking how to replace space character between words using query..i say it's easy just use RTRIM and LTRIM function but again he said what about replace the character after that? RTRIM and LTRIM only remove leading and trailing spaces, let say u have this word ' a b c d ', using RTRIM and LTRIM only make it something like this 'a b c d'. what about spaces after the word 'a', 'b', so on?? i thought it was easy, using REPLACE then but that's not what he want because REPLACE only make the word is non-readable so i'm thinking using something like this DECLARE @INITIAL VARCHAR(100) DECLARE @Rest VARCHAR(100) DECLARE @Final VARCHAR(100) DECLARE @CharToFind VARCHAR(5) DECLARE @ReplaceChar VARCHAR(5) DECLARE @found INT SET @Initial = ' a,,b,,,c,,,,,,,,,,d,,,,,,,, ' SET @Final = '' SET @CharToFind =',' SET @ReplaceChar ='.' SELECT @Rest = REPLACE(RTRIM(LTRIM(@Initial)), @CharToFind, @R...
this is my personal web blog..anything that i do each day hopefully can get in this blog since i only able to write it if i have spare time at the office..(ky g kerja aj ya hahaa)