Home » SQL & PL/SQL » SQL & PL/SQL » Number format with Decimals (merged)
Number format with Decimals (merged) [message #396412] Mon, 06 April 2009 08:52 Go to next message
ramya29p
Messages: 100
Registered: November 2007
Location: Chennai
Senior Member
Hi i have one Urgent Requirement that the number to be displayed in the format of 9999.99999 and the total length should be 10.
I tried the below Query but i am not getting the Exact Format. Can anyone please help me.

SQL> select rpad(to_char(1115.73002,'9999.99999'),10,' ') from dual;

RPAD(TO_CHAR(1115.73002,'9999.
------------------------------
 1115.7300


i want the output to be displayed as 1115.73002
Re: Number format with Decimals (merged) [message #396414 is a reply to message #396412] Mon, 06 April 2009 09:00 Go to previous messageGo to next message
Michel Cadot
Messages: 64151
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
SQL> select rpad(to_char(1115.73002,'fm9999.99999'),10,' ') from dual;
RPAD(TO_CH
----------
1115.73002

1 row selected.

Regards
Michel
Re: Number format with Decimals (merged) [message #396525 is a reply to message #396414] Tue, 07 April 2009 02:11 Go to previous message
ramya29p
Messages: 100
Registered: November 2007
Location: Chennai
Senior Member
Thank you Michel

Previous Topic: Tricky query
Next Topic: ORA 600 error
Goto Forum:
  


Current Time: Fri Dec 09 17:13:07 CST 2016

Total time taken to generate the page: 0.19649 seconds