Solved

how to format a number from Oracle being delivered via e-mail

Posted on 2010-09-13
8
464 Views
Last Modified: 2013-12-18
I send this via e-mail, pulling data from Oracle via Pl-Sql and then a Send-mail routine.

CLM - NASCO MD - 035: Errors = 7, Loaded = 259364, percent errors = 0
MEM - FLEXX/Facets Merge - 104: Errors = 4648, Loaded = 137287, percent errors = 3

I know it's ugly, but at the moment all I want to do is add commas to the numbers, 259,364

I've done a little HTML tagging in e-mails, but not sure how to format the numbers
0
Comment
Question by:Alaska Cowboy
[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
  • 5
  • 2
8 Comments
 
LVL 74

Expert Comment

by:sdstuber
ID: 33665036
convert the number to a string


to_char(loaded,'999,999')
0
 
LVL 1

Author Comment

by:Alaska Cowboy
ID: 33665046
ah, should have thought about that . . . will give it a shot, thanks.
0
 
LVL 35

Assisted Solution

by:johnsone
johnsone earned 60 total points
ID: 33665072
I would use this format:

to_char(loaded, '999G999')

The difference is subtle, but it should account for NLS settings.
0
Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

 
LVL 1

Author Comment

by:Alaska Cowboy
ID: 33665186
ok, didn't know about that, so thanks, will try in about an hour
0
 
LVL 1

Author Comment

by:Alaska Cowboy
ID: 33666015
and do both formats handle a million ?
0
 
LVL 74

Accepted Solution

by:
sdstuber earned 65 total points
ID: 33666044
no,  and assuming you don't want left padded strings, you'll also want "fm" as part of your format

to_char(loaded,'fm999,999,999')

or

to_char(loaded,'fm999G999G999')
0
 
LVL 1

Author Comment

by:Alaska Cowboy
ID: 33666053
ok, thanks a lot, working on it now . . .
0
 
LVL 1

Author Comment

by:Alaska Cowboy
ID: 33666137
ok, fixed, thanks !
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses

627 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