Re: Esay question, about the numeric format

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Rafa Comino <rafacomino(at)gmail(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org, pgsql-general(at)postgresql(dot)org
Subject: Re: Esay question, about the numeric format
Date: 2007-03-01 01:19:52
Message-ID: 20070301011952.GA5007@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-sql

On Thu, Feb 22, 2007 at 12:20:12 +0100,
Rafa Comino <rafacomino(at)gmail(dot)com> wrote:
> Hi every body
> I have this query
> SELECT 20.00::numeric(38,2)
> and postgre gives me 20, i need that postgre gives me 20.00
> What can i do? i suppose this must be easy, but i dont find how to do ir
> thanks every body

If the exact output format matters, you should probably use to_char to convert
the number to a string.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Shaun Johnston 2007-03-01 01:25:26 Assistance with Query Optimisation?
Previous Message Paul Lambert 2007-03-01 01:06:44 Re: PG periodic Error on W2K

Browse pgsql-sql by date

  From Date Subject
Next Message calendarw 2007-03-01 01:52:40 Re: How to union table without union statement?
Previous Message Noura Elhawary 2007-03-01 00:48:17 what is the best way to get key information in postgres?