locked
format number oracle RRS feed

  • Question

  • User-1075092149 posted

    i have calculated some filed, but i don't know how to format the field when the number is less than 1.

    for example, 1-.5= .5

    how can i format 0.5 in Oracle

    Monday, November 19, 2012 4:40 AM

All replies

  • User269602965 posted

    TO_CHAR(numcol,'0.9') AS formatted_numcol

    Monday, November 19, 2012 3:03 PM
  • User-1075092149 posted

    TO_CHAR(numcol,'0.9') AS formatted_numcol

     

    but when the numcol=16, it ouputs ###

    how to fix it ?

     i only want to format the field to 0.X when the value is less than 1, otherview, i want to ouput it own value.

    Monday, November 19, 2012 10:56 PM