Solved

how i do a format string field on Oracle Report to number?

Posted on 2006-06-20
3
105 Views
Last Modified: 2008-03-10
Hi experts,

      I have a field on Oracle Report and i need format to number a string field,  that is the code:

function CF_1FORMULA0045 return Char is
begin
  if ((:monto_total)= 0) then
        return('');
  ELSE
        RETURN(SELECT TO_NUMBER(:MONTO_TOTAL) FROM DUAL);
  end if;       
end;
                    the field MONTO_TOTAL must be formating to similar this number     12,987,456.89,   the problem is what this field is a String Field

0
Comment
Question by:jlguerra
3 Comments
 
LVL 30

Accepted Solution

by:
callrs earned 50 total points
ID: 16948414
Maybe:
TO_NUMBER(:MONTO_TOTAL,'99,999,999.99')

http://www.techonthenet.com/oracle/functions/to_number.php     Oracle/PLSQL: To_Number Function
www.ss64.com/orasyntax/to_number.html    to_number
http://www.ss64.com/orasyntax/numfmt.html     Oracle number format

http://www.rittman.net/2003/10/15.html Has this example: "TO_NUMBER(:c1,'999,999,999.99')"
(Note the double quotes, which you may or may not need...)
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Do you have the problem that a lot of tasks are stacking up fairly quickly? A good way to reduce your big task list is to apply the 3 minute rule. Its fairly simple: if someone asks you to do a specific task, and you know for a fact that it will …
Surprisingly, there is a lot to Gym battles, and I thought it would be helpful to share knowledge about all the ins and outs of this feature!
Notifications on Experts Exchange help you keep track of your activity and updates in one place. Watch this video to learn how to use them on the site to quickly access the content that matters to you.
Where to go on the main page to find the job listings. How to apply to a job that you are interested in from the list that is featured on our Careers page.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now