Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Forcing 2 Decimal Positions

Re: Forcing 2 Decimal Positions

From: Arup Nanda <orarup_at_hotmail.com>
Date: Wed, 12 Mar 2003 11:59:23 -0800
Message-ID: <F001.00568084.20030312115923@fatcity.com>


Forcing 2 Decimal PositionsLaura,

It woroks for me.

SQL> select to_char(clusterid,'99999.90') from t;

TO_CHAR(C



  1234.89
  1234.80

SQL> select clusterid from t;

 CLUSTERID


   1234.89
    1234.8

SQL> col clusterid format 99999.90
SQL> / CLUSTERID



  1234.89
  1234.80

HTH. Arup

  I know this must be extremely simple, but the only thing I can find for this is column format and that doesn't work, so could someone tell me how to force an amount field to show 2 decimal positions? I have tried format 999.99 and 990.00 but it will not print the zero if it is after the decimal ( i.e. 100.5 or 88 ). I know I have done this before but I guess I have gone brain dead.

  Thanks in advance!

  Laura

--

Please see the official ORACLE-L FAQ: http://www.orafaq.net
--

Author: Arup Nanda
  INET: orarup_at_hotmail.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Wed Mar 12 2003 - 13:59:23 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US