Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2010-09-13
8
Medium Priority
?
469 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 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

A solution for Fortify Path Manipulation.
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

715 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