Removing Spaces in MIDDLE of a Column - Resolved

Hi experts,
I have found 2 ways to remove both leading and trailing spaces from a column:

update Table1 set Col1 = TRIM(Col1)
OR update Table1 set Col1 = LTRIM(RTRIM(Col1))

These seem to do the same thing.

But they don't remove spaces that are embedded in the middle of the column.

If the column has 1A 2B how can I remove the space between "A" and "2" ?

Thanks

Use REPLACE:

REPLACE(Col1, ' ', '')

1 Like

That did it. Thanks @ScottPletcher