Re: problem in to_char() function

From: "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: problem in to_char() function
Date: 2006-11-16 13:22:37
Message-ID: 20061116132237.GH31228@a-kretschmer.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

am Thu, dem 16.11.2006, um 16:05:15 +0530 mailte deepak pal folgendes:
> hi i want to convert 238.000 to 238.0 value 238.000 i got from database how to
> use to_char() function...............??

Use round() instead.

test=> select round(238.000::numeric, 1);
round
-------
238.0
(1 row)

Andreas
--
Andreas Kretschmer
Kontakt: Heynitz: 035242/47215, D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Hitoshi Harada 2006-11-16 14:06:22 Re: calculated default
Previous Message surabhi.ahuja 2006-11-16 10:50:28 Re: empty folder for downlaoding PostgreSQL 8.1.5 for FC4