我有下面的代码。小数字符是“.”。我想把它改成“,”。我试图使用替换,但它不工作。你能给我建议一个替代方案吗?
SELECT
,CASE WHEN t1."EID"='10' THEN cast(t1."PAYVal" as decimal(12,2)) ELSE cast(t1."PAYVal"*t2."EXCValue" as decimal(12,2)) END as plata_LEI
,CASE WHEN t1."EID"='2'
THEN cast(t1."PAYVal" as decimal(12,2))
ELSE CASE WHEN t1."EID"='10' THEN cast(t1."PAYVal"/t3."EXCValue" as decimal(12,2))
ELSE cast(t1."PAYVal"*t2."EXCValue"/t3."EXCValue" as decimal(12,2))
END
END as plata_EUR
谢谢。
1条答案
按热度按时间dluptydi1#
您不能使用replace函数,因为您正在将其转换为decimal类型。您需要再次将结果键入文本并使用替换函数,如下所示,