Solved

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

Posted on 2006-06-20
3
110 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 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

One of the biggest challenges facing freelancers is balancing multiple projects and deadlines. Organizational skills and time management are key to keeping up with projects and staying on track. Luckily, we’ve curated seven tools to help you focus o…
This story has been written with permission from the scammed victim, a valued client of mine – identity protected by request.
The Bounty Board allows you to request an article or video on any technical topic, or fulfill a bounty request to earn points. Watch this video to learn how to use the Bounty Board to get the content you want, earn points, and browse submitted bount…
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…

733 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