Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2010-09-13
8
Medium Priority
?
470 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
  • 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 240 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
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

 
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 260 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

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

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?
A solution for Fortify Path Manipulation.
This video shows how to recover a database from a user managed backup
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

927 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