Convert string numeric values with comma as decimal separator to NUMERIC(10, 2)
18
votes
3
answers
154965
views
I have an SQL table of varchar columns which contain Greek formatted numbers (. as thousand separator and comma as decimal separator)
The classic conversion
CONVERT(numeric(10,2),REPLACE([value],',','.'))
does not work because the . (thousand separator) kills the conversion
E.g try
CONVERT(numeric(10,2),REPLACE('7.000,45',',','.'))
I want to convert such values to numeric(10,2)
Any suggestions of how to handle it?
Asked by PanosPlat
(521 rep)
Oct 14, 2015, 06:58 PM
Last activity: Jun 20, 2018, 09:30 PM
Last activity: Jun 20, 2018, 09:30 PM