Home » Developer & Programmer » Reports & Discoverer » Number format (6i)
Number format [message #527841] Thu, 20 October 2011 06:53 Go to next message
glmjoy
Messages: 187
Registered: September 2011
Location: KR
Senior Member
I have a value 233560.66 but in report its showing 233560.67 using format NNNGNNNGNNNGNN0D00 but when i remove format it shows 233560.665 but i want result 233560.66


Thanks in Advance
Re: Number format [message #527849 is a reply to message #527841] Thu, 20 October 2011 06:58 Go to previous messageGo to next message
Littlefoot
Messages: 21807
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Truncate the value first (FMT_3 is what you are after, I suppose):

SQL> with test as
  2    (select 233560.66 col from dual union
  3     select 233560.67 from dual union
  4     select 233560.665 from dual
  5    )
  6  select col,
  7    to_char(col, '999G990D00') fmt_1,
  8    trunc(col, 2) fmt_2,
  9    to_char(trunc(col, 2), '999G990D00') fmt_3
 10  from test;

       COL FMT_1            FMT_2 FMT_3
---------- ----------- ---------- -----------
 233560.66  233,560.66  233560.66  233,560.66
233560.665  233,560.67  233560.66  233,560.66
 233560.67  233,560.67  233560.67  233,560.67

SQL>
Re: Number format [message #527857 is a reply to message #527849] Thu, 20 October 2011 07:33 Go to previous message
glmjoy
Messages: 187
Registered: September 2011
Location: KR
Senior Member
Thanks
Previous Topic: Schedule a workbook and save to a location - discoverer plus
Next Topic: A4 printing
Goto Forum:
  


Current Time: Sat Apr 20 02:56:34 CDT 2024