Solved

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

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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

Stuck in voice control mode on your Amazon Firestick?  Here is how to turn it off!!!
I've been asked to discuss some of the UX activities that I'm using with my team. Here I will share some details about how we approach UX projects.
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…
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.

696 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