Reputation: 11
I exported data from an excel file. From that file, I have a column called 'ID'.For now that column has entries like the following.
ID
1.14455,
2.48755,
3.65588,
4.25415,
and so on.
I need to get rid of that comma from the column. How do I do it?
Upvotes: 1
Views: 37
Reputation: 1269853
If there are no other commas in the values, then just use replace()
:
select replace(col, ',', '')
If there are possibly other commas:
select (case when col like '%,' then left(col, len(col) - 1)
else col
end)
Upvotes: 2