Solved

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

Posted on 2010-09-13
8
462 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
Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

 
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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ArrayList Adding/settign data 3 38
Moving Oracle Database to other server 2 47
Oracle - BLOB Extract Line 2 22
using executorService 3 25
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

710 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