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
amardilo
Messages: 37
Registered: February 2007
Member
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
moshea
Messages: 51
Registered: February 2008
Location: Dublin, Ireland
Member
Check out TO_CHAR or TO_CHAR

Michael
Previous Topic: Alternative for UPDATE CURSOR
Next Topic: how to view the code written in a procedure
Goto Forum:
  


Current Time: Fri Dec 09 06:17:34 CST 2016

Total time taken to generate the page: 0.11498 seconds