i need numeric mask like this:
100
101.1
102.123
Take maksimum given decimal places but if last digit is 0 trim it. Something like: @n-12_`2 but trim right 0 and . Ex:
x = 102.1230057::double precision
select rtrim(rtrim(round(x::numeric, 2)::text, '0'), '.')::numeric