Link : http://stackoverflow.com/questions/2182877/sql-method-to-replace-repeating-blanks-with-single-blanks
Here is a simple set based way that will collapse multiple spaces into a single space by applying three replaces. 
Your Update statement can now be set based: 
Use an appropriate Where clause to limit the Update to only the rows that have you need to update or maybe have double spaces. 
e.g. 
I have found an external write up on this method: REPLACE Multiple Spaces with One 
 | 
No comments:
Post a Comment