Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2006-06-20
3
Medium Priority
?
117 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

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.
Gift cards are not a new concept - it's been around for a very long time.  Undoubtedly, over the past you have received such a card or purchased one for a friend or relative.  Are you aware that you've been feeding the machine?  If not, read on :)
Articles on a wide range of technology and professional topics are available on Experts Exchange. These resources are written by members, for members, and can be written about any topic you feel passionate about. Learn how to best write an article t…
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…
Suggested Courses

618 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