Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id EC57C9FBAAC for ; Mon, 25 Jun 2007 12:33:43 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 49838-05-2 for ; Mon, 25 Jun 2007 12:33:34 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from mx1.wp.pl (mx1.wp.pl [212.77.101.5]) by postgresql.org (Postfix) with ESMTP id 9B4379FBA4C for ; Mon, 25 Jun 2007 12:33:34 -0300 (ADT) Received: (wp-smtpd smtp.wp.pl 5746 invoked from network); 25 Jun 2007 17:33:32 +0200 Received: from ip-213-17-164-70.netia.com.pl (HELO [127.0.0.1]) (ipluta@[213.17.164.70]) (envelope-sender ) by smtp.wp.pl (WP-SMTPD) with SMTP for ; 25 Jun 2007 17:33:32 +0200 Message-ID: <467FE049.9040008@wp.pl> Date: Mon, 25 Jun 2007 17:33:29 +0200 From: Ireneusz Pluta User-Agent: Thunderbird 1.5.0.12 (Windows/20070509) MIME-Version: 1.0 To: Joshua CC: pgsql-sql@postgresql.org Subject: Re: simple SQL question References: <467FD14F.7000302@joshuaneil.com> In-Reply-To: <467FD14F.7000302@joshuaneil.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-WP-AV: skaner antywirusowy poczty Wirtualnej Polski S. A. X-WP-SPAM: NO 0000000 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200706/196 X-Sequence-Number: 28686 Joshua napisaƂ(a): > 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 > > I have been playing around with string functions but cannot seem to > figure out a quick solution. Does anyone have any suggestions? if I read you correctly, I might suggest: select round(your_column/100.0, 2) as divided_by_100 from your_table; (note dividing by 100.0 (decimal), not just by 100 (integer)) > > Please let me know. > > Thanks. > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Have you searched our list archives? > > http://archives.postgresql.org > > > >