Re: to_char(0,'FM990D99') = "0." instead of "0"

From: Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
To: Janning Vygen <vygen(at)gmx(dot)de>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: to_char(0,'FM990D99') = "0." instead of "0"
Date: 2002-08-01 09:18:01
Message-ID: 20020801111801.B10347@zf.jcu.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Jul 22, 2002 at 03:39:43PM +0200, Janning Vygen wrote:
> select to_char(1, 'FM990D99');
> 1
> select to_char(0, 'FM990D99');
> 0.
>
> how to avoid the decimal point in the second query??

Don't use FM?

This is Oracle (8.0.x) example:

SVRMGR> SELECT to_char(0, '990D99') FROM DUAL;
TO_CHAR
-------
0.00
1 row selected.
SVRMGR> SELECT to_char(0, 'FM990D99') FROM DUAL;
TO_CHAR
-------
0.
1 row selected.

Ask Larry Ellison for this feature... :-)

Karel

--
Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
http://home.zf.jcu.cz/~zakkr/

C, PostgreSQL, PHP, WWW, http://docs.linux.cz, http://mape.jcu.cz

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Karel Zak 2002-08-01 10:01:52 Re: getpid() function
Previous Message 9902468 2002-08-01 09:09:02 System catalog and identifying