Thread: problem in to_char() function

problem in to_char() function

From
"deepak pal"
Date:
hi i want to convert 238.000 to 238.0 value 238.000 i got from database how to use to_char() function...............??

Re: problem in to_char() function

From
"A. Kretschmer"
Date:
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