?
Solved

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

Posted on 2006-06-20
3
Medium Priority
?
114 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 30

Accepted Solution

by:
callrs earned 200 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

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you get continual lockouts after changing your Active Directory password, there are several possible reasons.  Two of the most common are using other devices to access your email and stored passwords in the credential manager of windows.
This article is written by John Gates, CISSP. Gates, the SNUG President-Elect, currently holds the position of Manager of Information Systems at Lake Park High School in Roselle, Illinois.
Saved searches can save you time by quickly referencing commonly searched terms on any topic. Whether you are looking for questions you can answer or hoping to learn about a specific issue, a saved search can help you get the most out of your time o…
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.
Suggested Courses

765 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