Search Postgresql Archives

Re: strip zeros from fractional part

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Did you look at the round function?

> -----Original Message-----
> From: pgsql-general-owner@xxxxxxxxxxxxxx [mailto:pgsql-general-
> owner@xxxxxxxxxxxxxx] On Behalf Of Giovanni M.
> Sent: Monday, October 03, 2005 11:45 AM
> To: pgsql-general@xxxxxxxxxxxxxx
> Subject:  strip zeros from fractional part
> 
> Hi guys,
> 
> I am searching for a function that enables me to strip the trailing
> zeros in the fractional part of a number (numeric type). For example a
> number saved in a column of type numeric as such: 23.45000 would be
> returned as 23.45
> 
> I can't find any function that does this in the documentation, does
> something like this exist or do i need to write some custom function
> myself?
> 
> Thanks for any help,
> 
> Giovanni Martina
> 
> --
> A World of KEIGI
> http://keigi.blogspot.com
> 
> ---------------------------(end of
broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
> 
>                http://www.postgresql.org/docs/faq

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux