To_number function [message #388564] |
Wed, 25 February 2009 07:57 |
ramya29p
Messages: 146 Registered: November 2007 Location: Chennai
|
Senior Member |
|
|
Hi i want to display the number with decimals & right aligned for example 1.000
i tried by using to_number but it is displaying as "1"
Can anyone help me ?
|
|
|
|
|
|
|
|
|
Re: To_number function [message #388578 is a reply to message #388572] |
Wed, 25 February 2009 08:36 |
ramya29p
Messages: 146 Registered: November 2007 Location: Chennai
|
Senior Member |
|
|
ya if i use the below query select to_char(1.000,'999999.9999') from dual
i am getting the correct value but it is not right aligned
|
|
|
|
|
|
Re: To_number function [message #388599 is a reply to message #388578] |
Wed, 25 February 2009 10:49 |
JRowbottom
Messages: 5933 Registered: June 2006 Location: Sunny North Yorkshire, ho...
|
Senior Member |
|
|
It is right aligned, in that there are spaces to the left of the output string, but in SQL Developer, the column output isn't right aligned with respect to the column heading.
|
|
|
Re: To_number function [message #388771 is a reply to message #388599] |
Thu, 26 February 2009 03:18 |
ramya29p
Messages: 146 Registered: November 2007 Location: Chennai
|
Senior Member |
|
|
I am loading the value from the table to Excel.i have attached the sample xls file.The amount field is displaying without decimals.i have used the below query
select
a.value_dt value_dt,
a.trn_ref_no ref_no,
to_char( a.lcy_amount,'99999999999999.99') gl_amt
from actb_daily_log a,
sttb_account b
where a.ac_no = b.ac_gl_no and b.gl_aclass_type = '1' and
b.ac_or_gl = 'A' and
b.branch_code = 'PR1';
[Updated on: Thu, 26 February 2009 03:24] Report message to a moderator
|
|
|
Re: To_number function [message #388775 is a reply to message #388771] |
Thu, 26 February 2009 03:22 |
JRowbottom
Messages: 5933 Registered: June 2006 Location: Sunny North Yorkshire, ho...
|
Senior Member |
|
|
No file attached.
That sounds like an excel issue - if you don't give the cell an explicit numeric format mask, it will (quite correctly) truncate trailing decimal zeroes
|
|
|
|
Re: To_number function [message #388778 is a reply to message #388776] |
Thu, 26 February 2009 03:33 |
JRowbottom
Messages: 5933 Registered: June 2006 Location: Sunny North Yorkshire, ho...
|
Senior Member |
|
|
Now right-click on one of those cells, pick Format from the list, set it to Number, and see what it displays.
Nb, this is ORAFaq, not ExcelFaq
|
|
|
|
Re: To_number function [message #388792 is a reply to message #388783] |
Thu, 26 February 2009 04:18 |
|
Michel Cadot
Messages: 68712 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
This is Excel that changes the type not Oracle.
So this has nothing to do with Oracle.
Post your question in an Excel forum.
Regards
Michel
|
|
|