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: Andrew Deighton <andrew_at_flamingo-solutions.co.uk>
Date: Wed, 15 Nov 2000 15:51:24 -0000
Message-ID: <3a12b47c$1@news.telinco.net>

create table a (a number);
insert into a values (123.45);
insert into a values (123);
select to_char(a) from a;
gives
TO_CHAR(A)



123.45
123

Is this what you wanted?

Andrew Deighton
www.Flamingo-Solutions.co.uk

<orauser_at_my-deja.com> wrote in message news:8utkei$og4$1_at_nnrp1.deja.com...
> Hello,
>
> 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.e, i want:
>
> 12345
> or 12345.66
> but never
> 12345.00
>
> Thanks in advance for your help.
>
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Wed Nov 15 2000 - 09:51:24 CST

Original text of this message

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