Re: [GENERAL] How to avoid: 9.50184e+06

2007-09-28 Thread Ted Byers
--- Stefan Schwarzer <[EMAIL PROTECTED]> wrote: > Hi there, > > how can I avoid results like this: 9.50184e+06 > > Instead it should return the "real" value, as > 950184. > But 9.50184e+06 IS the real value! That is about nine and a half million, not nine hundred and fifty thousand, BTW. I d

Re: [GENERAL] How to avoid: 9.50184e+06

2007-09-28 Thread Scott Marlowe
On 9/28/07, Stefan Schwarzer <[EMAIL PROTECTED]> wrote: > Hi there, > > how can I avoid results like this: 9.50184e+06 > > Instead it should return the "real" value, as 950184. > > Thanks for any hints! Cast it to numeric: select 9.50184e+06::real::numeric; But know that you're losing accuracy i

Re: [GENERAL] How to avoid: 9.50184e+06

2007-09-28 Thread Martijn van Oosterhout
On Fri, Sep 28, 2007 at 02:08:18PM +0200, Stefan Schwarzer wrote: > how can I avoid results like this: 9.50184e+06 > > Instead it should return the "real" value, as 950184. Presumably to_text would do what you want. Alternatively, perhaps you intended your column to be type numeric? Have a nice

Re: [GENERAL] How to avoid: 9.50184e+06

2007-09-28 Thread Merlin Moncure
On 9/28/07, Stefan Schwarzer <[EMAIL PROTECTED]> wrote: > Hi there, > > how can I avoid results like this: 9.50184e+06 > > Instead it should return the "real" value, as 950184. The type 'real' in postgresql comes from the mathematical definition of real, numbers that can be expressed as a fraction

[GENERAL] How to avoid: 9.50184e+06

2007-09-28 Thread Stefan Schwarzer
Hi there, how can I avoid results like this: 9.50184e+06 Instead it should return the "real" value, as 950184. Thanks for any hints! Stef Lean Back and Relax - Enjoy some Nature Photography: http://photoblog.la-famille