From: | Bob Dusek <bobd(at)palaver(dot)net> |
---|---|
To: | Ulf Mehlig <umehlig(at)uni-bremen(dot)de> |
Cc: | pgsql-general(at)postgreSQL(dot)org |
Subject: | Re: [GENERAL] casting float8 type |
Date: | 1998-11-05 12:04:57 |
Message-ID: | 36419469.9343F24F@palaver.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Thank you Ulf,
It works perfectly (so far :-)
Thanks a lot,
Bob
Ulf Mehlig wrote:
>
> Bob Dusek <bobd(at)palaver(dot)net> wrote:
>
> > How would I go about converting a value of type 'float8' to a value
> > of type 'int'? It's probably not possible to do a straight
> > conversion of a float to an int, but is there a truncate, or a
> > rounding function that I could use? I couldn't find such a thing in
> > my search.
>
> in a table/class `tbl' with an float attribute `fl' of my 6.3.2 database,
> the following works:
>
> select cast(fl as int4) from tbl;
>
> Hope it helps!
>
> Ulf
>
> --
> ======================================================================
> %%%%% Ulf Mehlig <ulf(dot)mehlig(at)uni-bremen(dot)de>
> %%%%!%%% Projekt "MADAM" <umehlig(at)uni-bremen(dot)de>
> %%%% %!% %%%% ----------------------------------------------------
> ---| %%% MADAM: MAngrove | Center for Tropical Marine
> ||--%!% Dynamics | Biology
> || And | Fahrenheitstrasse 1
> _ /||\_/\_ Management |
> / / \ \ ~~~~~~~~~~~~~~~~~ | 28359 Bremen/Germany
> ~~~~~~~~~~~~~~~~~~~~
From | Date | Subject | |
---|---|---|---|
Next Message | Juan Carlos Castro y Castro | 1998-11-05 13:48:49 | Re: [GENERAL] November 4th, 1998: PostgreSQL v6.4 Released |
Previous Message | Bob Dusek | 1998-11-05 12:01:24 | age('now',date::datetime) |