• That depends on what you want to do. To remove all leading and trailing spaces, you would do:

    UPDATE tbl

    SET col = rtrim(ltrim(col))

    WHERE col <> rtrim(ltrim(col))

    To collapse multiple sequences of spaces, you could do:

    UPDATE tbl

    SET col = replace(col, ' ', ' ')

    WHERE col LIKE '% %'

    The later UPDATE does not handle tabs, which you need to handle separately.

    [font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]