Re: problem in to_char() function - Mailing list pgsql-general

From A. Kretschmer
Subject Re: problem in to_char() function
Date
Msg-id 20061116132237.GH31228@a-kretschmer.de
Whole thread Raw
In response to problem in to_char() function  ("deepak pal" <deepak.05pal@gmail.com>)
List 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

pgsql-general by date:

Previous
From: "surabhi.ahuja"
Date:
Subject: Re: empty folder for downlaoding PostgreSQL 8.1.5 for FC4
Next
From: Tom Lane
Date:
Subject: Re: can't start postgresql