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

Home -> Community -> Usenet -> c.d.o.server -> Re: Suppress digits after decimal point if integer

Re: Suppress digits after decimal point if integer

From: Andreas Necker <Andreas.Necker_at_isb-ka.de>
Date: Wed, 15 Nov 2000 14:23:05 +0100
Message-ID: <3A128E39.66CDD212@isb-ka.de>

hi,

orauser_at_my-deja.com wrote:
>
> Is it possible to have a to_char number format to only
> print the .xx part of a number, if it is not
> an integer?
>

i don't think so.

you should write your own 'to_char' as a stored function or try something like this:
select to_char( decode( mod( col, trunc( col )), 0, trunc( col ), col )) from tab;

-- 
Andreas Necker

ISB AG              Tel: +49 (0)721/82800-0
Karlstrasse 52-54   Fax: +49 (0)721/82800-82
76133 Karlsruhe     mailto:Andreas.Necker_at_isb-ka.de
Germany             http://www.isb-ka.de
Received on Wed Nov 15 2000 - 07:23:05 CST

Original text of this message

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