Home » SQL & PL/SQL » SQL & PL/SQL » Force a Number to 2dp (10g)
Force a Number to 2dp [message #299361] Mon, 11 February 2008 12:24 Go to next message
Messages: 37
Registered: February 2007
Hi there,

I have a column in my database set as a NUMBER (9,2) but I need to run selects on that column into a string but I have to always make sure that the number values is always 2 decimal places. When the figure returns a value of say 9.99 it is fine as I get 99 as my 2 decimal places however when I have a whole number I don't get .00. Is there a way to force the value returned from my select to always be 2 decimal places.

Anyone have any ideas?
Re: Force a Number to 2dp [message #299362 is a reply to message #299361] Mon, 11 February 2008 12:33 Go to previous message
Messages: 51
Registered: February 2008
Location: Dublin, Ireland
Check out TO_CHAR or TO_CHAR

Previous Topic: Subscript beyond count
Next Topic: Is this a bug or a "feature"
Goto Forum:

Current Time: Sat Aug 19 15:31:54 CDT 2017

Total time taken to generate the page: 0.07891 seconds