Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Formatting a number column to look like currency

Ramky99Mar 26 2008 — edited Mar 26 2008
Afternoon all,

Having some fun and games writing something that'll make the currency values our app stores look more like currency for another app to read and utilize.

Values are stored in a number field (12 length if that matters) and do not have any decimal points .. e.g. $2000 is stored as 200000 and $19.95 as 1995

I need to write a select that formats these as 2000.00 and 19.95 respectively.

1995 is easy enough, just divide by 100, but where amounts are exact I still need the trailing .00

I've been reading about using the convert function, but that only seems to apply when I want to take something that's a char already - any ideas?

Thanks!!
Adam
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 23 2008
Added on Mar 26 2008
8 comments
9,721 views