Sunday, June 1, 2014

How to remove the long space in the sentence using SQL SERVER

Step 1:- Example sentence 'Hello               Welcome   to   lokeshasp.blogspot.com' Step2:-Write the below code DECLARE @str varchar(150) SET @str='Hello               Welcome   to   lokeshasp.blogspot.com' Select REPLACE(REPLACE(REPLACE(@str,' ','[]'),'][',''),'[]',' ') OutPut :- Hello Welcome...
Read More »