Re: simple SQL question

From: Glenn Davy <glenn(at)tangelosoftware(dot)net>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: simple SQL question
Date: 2007-06-25 15:02:44
Message-ID: 200706260102.44313.glenn@tangelosoftware.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Tue, 26 Jun 2007 12:30:34 am Joshua wrote:
> I have a column with the following values (example below)
>
> 5673
> 4731
> 4462
> 5422
> 756
> 3060
>
> I want the column to display the numbers as follows:
>
> 56.73
> 47.31
> 44.62
> 54.22
> 7.56
> 30.60
>

what happens when you try

select cast(MYCOL/100 as NUMERIC(4,2)) FROM MYTABLE

?

Glenn

> I have been playing around with string functions but cannot seem to
> figure out a quick solution. Does anyone have any suggestions?
>
> Please let me know.
>
> Thanks.
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Joshua 2007-06-25 15:28:40 another simple SQL question
Previous Message Derrick Betts 2007-06-25 14:55:35 Re: simple SQL question