Re: How to truncate? integers

From: Steve Crawford <scrawford(at)pinpointresearch(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: How to truncate? integers
Date: 2011-11-16 21:07:50
Message-ID: 4EC42626.2030409@pinpointresearch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On 11/16/2011 12:26 PM, Johann Schatzer wrote:
> How can I ~truncate~ integers?
>
>
> this column
>
> 4770
> ...
>
> should give
>
> 4700
> ...

To the next lower 100? Try this:

select floor(4770*.01)*100;
?column?
----------
4700

Cheers,
Steve

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Steve Crawford 2011-11-16 21:11:07 Re: How to truncate? integers
Previous Message Johann Schatzer 2011-11-16 20:26:19 How to truncate? integers