pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ludwig Lim <lud_nowhere_man@yahoo.com>
To: PostgreSQL Mailing List <pgsql-sql@postgresql.org>
Subject: Formatting zeroes
Date: Mon, 16 Sep 2002 07:41:49 -0700 (PDT)
Message-ID: <20020916144149.39360.qmail@web80309.mail.yahoo.com> (raw)

Hi:

  I'm trying to use SQL to generate a formatted
report. The "to_char(numeric,'FM9,999,999,999.99')"
function works when I use it format numbers with
decimal points and appropriate commas.
  
   However my problem is when I encounter a row has a
zero for one its column. It displays "0.", I tried
using with other formatting options but it does not
display zero the way I like ( "0" or "0.0").

  Is there a format specifier in the to_char function
that it will display 0 as "0" or "0.0"?

thanks,

ludwig.


__________________________________________________
Do you Yahoo!?
Yahoo! News - Today's headlines
http://news.yahoo.com



view thread (3+ messages)  latest in thread

Message-ID: <20020916144149.39360.qmail@web80309.mail.yahoo.com>
Permalink:  ../20020916144149.39360.qmail@web80309.mail.yahoo.com/
Also on:    postgresql.org/message-id/20020916144149.39360.qmail@web80309.mail.yahoo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: lud_nowhere_man@yahoo.com
  Subject: Re: Formatting zeroes
  In-Reply-To: <20020916144149.39360.qmail@web80309.mail.yahoo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox