Show comma instead of point as decimal separator

前端 未结 5 1443
孤城傲影
孤城傲影 2020-12-31 15:30

I just want to get the right number format here in germany, so i need to show commas as decimal separator instead of points. But this...

DECLARE @euros money         


        
5条回答
  •  [愿得一人]
    2020-12-31 16:26

    You could use replace something like this:

    DECLARE @euros money 
    SET @euros = 1025040.2365
    
    SELECT REPLACE(REPLACE(CONVERT(varchar(30), @euros, 1),',',''),'.',',');
    

    SQL Fiddle Demo

提交回复
热议问题