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

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
LVL 1
Alaska CowboyAsked:
Who is Participating?
 
sdstuberCommented:
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
 
sdstuberCommented:
convert the number to a string


to_char(loaded,'999,999')
0
 
Alaska CowboyAuthor Commented:
ah, should have thought about that . . . will give it a shot, thanks.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
johnsoneSenior Oracle DBACommented:
I would use this format:

to_char(loaded, '999G999')

The difference is subtle, but it should account for NLS settings.
0
 
Alaska CowboyAuthor Commented:
ok, didn't know about that, so thanks, will try in about an hour
0
 
Alaska CowboyAuthor Commented:
and do both formats handle a million ?
0
 
Alaska CowboyAuthor Commented:
ok, thanks a lot, working on it now . . .
0
 
Alaska CowboyAuthor Commented:
ok, fixed, thanks !
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.