Replace "," with "." in a SQL query in Excel

Viewed 42

I have a column of numbers with different decimal symbols: the new observations have "." and the old observations have ",". I want them all to have a decimal point as delimiter.
When using REPLACE(Column1, ",", "."), I get a correct result in cells where a decimal coma used to be, but an empty cell is returned for observations that had a decimal point previously.

what I have what I want what I get
2.9 2.9
3,1 3.1 3.1

How do I get to see a decimal point for all observations?
UPD: I create a query in my Excel workbook to import an xls from a web source. Excel imports a table from an xls file from the web. By default, the query for the table is SELECT * from Workbook. As I want to manipulate the data, I modify the OLE DB Query with Command Type "SQL" associated with the table.
Thank you in advance.

UPD 2 The problem was that the first observation was a float. When converted to varchar, REPLACE() works perfectly well.

1 Answers

Replace double quotes with single quotes. Like this:

REPLACE(Column1, ',', '.')
Related