• ...

    If we are talking about timming spaces or doing smth else with the elements, it would be better to split string, do manipulations and concat it back.

    or use well known way of removing duplicate spaces (http://www.sqlservercentral.com/articles/T-SQL/68378/) with one more check...

    declare @a varchar(500)

    set @a = ' Alexandria , VA , Arlington , TX '

    set @a = REPLACE(''''+REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(LTRIM(RTRIM(@a)),' ',' '+CHAR(7)),CHAR(7)+' ',''),CHAR(7),''),' , ', ','),',',''',''')+'''',''','' ',''',''')

    select @a

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]