Home » SQL & PL/SQL » SQL & PL/SQL » Decimal place problem...Round Function
icon5.gif  Decimal place problem...Round Function [message #222620] Mon, 05 March 2007 12:34 Go to next message
balaji23_d
Messages: 123
Registered: February 2007
Senior Member
Hi everyone,
i have another problem, hope someone can help me!
i have a ROUND function like this..
ROUND(amount, 4)
This function will round up to 4 digit decimal place if the amount more than 4 digit decimal place, e.g 4.56879 -> 4.5688
But if the amount less then 4 digit decimal place, e.g 4.23 -> 4.23. it will display the same amount.
My question is, how i can add the zero at the back, make up like 4.2300, because i want all the amount will have 4 digit decimal place when it display in the screen.
what i can add to the ROUND function??????
Thanks!
Re: Decimal place problem...Round Function [message #222623 is a reply to message #222620] Mon, 05 March 2007 12:39 Go to previous messageGo to next message
MarcL
Messages: 455
Registered: November 2006
Location: Connecticut, USA
Senior Member
Try this document

http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14200/sql_elements004.htm

Hope it helps
Re: Decimal place problem...Round Function [message #222688 is a reply to message #222623] Mon, 05 March 2007 23:07 Go to previous message
hari.choprala
Messages: 65
Registered: November 2006
Location: Mumbai
Member



SQL> select to_char(round(12.34,4),'99.9999') from dual;

rgds
Hari Krishna


Previous Topic: Autogenerate number?
Next Topic: Datatype BLOB,CLOB in oracle
Goto Forum:
  


Current Time: Tue Dec 06 08:10:43 CST 2016

Total time taken to generate the page: 0.08351 seconds