I wrote a query that displays the number and maximum number of decimal places from a given column. It can by two, three or four decimal places.
I would like cast this number as money, but that the number of decimal places would not be cut off to two.
select
reverse(concat(replicate('0', case when @maxSpaces > 2 then @maxSpaces else 2 end - licznik), val)) value,
replace(replace(convert(varchar, cast(reverse(concat(replicate('0', @maxSpaces - licznik), val)) as money), 1), ',', ' '), '.', ',') as value_money
from
@TABval
I want to get exactly this format:
答案 0 :(得分:1)
这里有两种变体,可以使用文化参数来获得所需的输出
ans <- dplyr::left_join(A,B, by "ID")