Both work (to_char and casting to numeric)
Thanks !
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andreas
Kretschmer
Sent: Thursday, December 06, 2007 1:46 PM
To: pgsql-general@postgresql.org
Subject: Re: [GENERAL] reformatting floats ?
Gauthier, Dave
Gauthier, Dave <[EMAIL PROTECTED]> schrieb:
>
>
> Hi:
>
> if...
> create table coords (id int, x float, y float);
> then...
> insert into coords (id,x,y) values (1,1.000,2.001)
> and then...
> select * from coords
> i get...
> 1,1,2.001
> i want...
> 1.1.
On Thu, Dec 06, 2007 at 01:22:55PM -0500, Gauthier, Dave wrote:
> i get...
>
> 1,1,2.001
>
> i want...
>
> 1.1.000,2.001
>
> while retaining the numeric nature of the x,y data (for math ops in
> other operations).
I imagine you want to_char().
Have a nice day,
--
Mart
Hi:
if...
create table coords (id int, x float, y float);
then...
insert into coords (id,x,y) values (1,1.000,2.001)
and then...
select * from coords
i get...
1,1,2.001
i want...
1.1.000,2.001
while retaining the numeric nature of the x,y data