-2

Hi so i have been using to_char to round off my decimal to 2 digit. However, when it encounter value like 0.24 it only display .24 and ignore the 0. How should i make it to display 0.24?

to_char(0.24,'9,999,999.99')unit_price

Cheong Charlene
  • 275
  • 1
  • 2
  • 12

2 Answers2

1

Try this.

SELECT TO_CHAR(0.24,'0.00') FROM DUAL
Avrajit Roy
  • 3,233
  • 1
  • 13
  • 25
-2

Try lpad(to_char(0.24,'9,999,999.99')unit_price, 4)

kwalski
  • 580
  • 7
  • 15