1

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
Matestro
  • 39
  • 4

2 Answers2

0

If you don't need right aligned numbers, you can use @S10 (or the length you want).

Carlos Gutiérrez
  • 13,972
  • 5
  • 37
  • 47
0

@P<#.##P style pictures might help.

riffrazor
  • 447
  • 5
  • 8