Home » SQL & PL/SQL » SQL & PL/SQL » Single row function to format a number to dollar
Single row function to format a number to dollar [message #3016] Thu, 29 August 2002 17:00 Go to next message
Edward Stoever
Messages: 58
Registered: August 2002
Member
Is there a single row function that will format the column output into dollar equivalent? IE $123.55

Thanks!

Edward
http://www.1st-R8.com
Re: Single row function to format a number to dollar [message #3023 is a reply to message #3016] Fri, 30 August 2002 08:19 Go to previous messageGo to next message
Todd Barry
Messages: 4819
Registered: August 2001
Senior Member
sql>select to_char(123.55, 'FM$999.99') value from dual;
 
VALUE
--------
$123.55
Re: Single row function to format a number to dollar [message #3025 is a reply to message #3016] Fri, 30 August 2002 09:48 Go to previous message
Todd Barry
Messages: 4819
Registered: August 2001
Senior Member
That is a format model modifier that controls Fill Mode by suppressing blank padding - basically removes any leading spaces. Remove the FM if you want the result to be right-aligned.
Previous Topic: what is a CTAS in oracle
Next Topic: Installing a db
Goto Forum:
  


Current Time: Wed Apr 24 14:37:06 CDT 2024