X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id B97BB9F9C9E for ; Sat, 6 May 2006 17:07:44 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 72043-02 for ; Sat, 6 May 2006 17:07:36 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from coe.tamu.edu (edsun.coe.tamu.edu [165.91.232.6]) by postgresql.org (Postfix) with ESMTP id 32E5F9F969C for ; Sat, 6 May 2006 17:07:35 -0300 (ADT) Received: (from root@localhost) by bruner.coe.tamu.edu (8.13.1/8.13.1) id k46K3FOU027753; Sat, 6 May 2006 15:03:15 -0500 Received: from coe.tamu.edu (coe.tamu.edu [165.91.232.6]) by coe.tamu.edu (8.11.7p2+Sun/8.12.11) with ESMTP id k46K5aq19103; Sat, 6 May 2006 15:05:36 -0500 (CDT) Date: Sat, 6 May 2006 15:05:36 -0500 (CDT) From: "Ben K." To: pgsql-sql@postgresql.org cc: Jorge Godoy Subject: Re: Returning String as Integer In-Reply-To: <20060506153916.GA3434@wolff.to> Message-ID: References: <18AE59788A3FC640A367E5652E664D8002093F0C@xmb-sjc-237.amer.cisco.com> <200605051852.19596.jgodoy@gmail.com> <20060506153916.GA3434@wolff.to> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: by AMaViS 0.3.12 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/72 X-Sequence-Number: 25103 Jorge Godoy wrote: > numbers. Is there any way to select a value from this column and return > it as an integer? My twopence. I just happened to have the same problem with iReports for a 10 digit number - it may be case specific but in my case # select ... int4(id) ...; worked. I tried int8(id) but java didn't take it as Integer. (It took int8 as something like Long.) Regards, Ben