Solved

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

Posted on 2010-09-13
8
451 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 73

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 34

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
 
LVL 1

Author Comment

by:Alaska Cowboy
ID: 33665186
ok, didn't know about that, so thanks, will try in about an hour
0
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
LVL 1

Author Comment

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

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
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…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

746 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now