How to remove spaces in middle of string in SQL server

easy_life
easy_life used Ask the Experts™
on
I have string and I want to remove spaces in middle
for example I have a string like :- GOVT OFFICE
and I want to show as  GOVTOFFICE.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Billing Engineer
Most Valuable Expert 2014
Top Expert 2009
Commented:
REPLACE(yourfield, ' ' , '')

will remove all the spaces...

Author

Commented:
it works great! and thanks for quick reply

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial