X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 396EDD1B4E6 for ; Fri, 21 Nov 2003 18:29:32 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 62833-07 for ; Fri, 21 Nov 2003 14:29:01 -0400 (AST) Received: from axiontctxus1.axiontech.com (unknown [216.52.172.78]) by svr1.postgresql.org (Postfix) with SMTP id 79042D1D5BA for ; Fri, 21 Nov 2003 14:29:00 -0400 (AST) Received: (qmail 18587 invoked by uid 104); 21 Nov 2003 18:29:00 -0000 Received: from yudie@axiontech.com by axiontctxus1 with network-box scanner-1.10 (received+scanned in 1.88773 secs); 21 Nov 2003 18:29:00 -0000 X-Scanned-By-axiontctxus1: Virus scan performed by network-box (www.network-box.com) X-Scanned-By-axiontctxus1: Scanner file id is axiontctxus1106943933948318579 X-Scanned-By-axiontctxus1: No known viruses found in message (received+scanned in 1.88773 secs) X-Scanned-By-axiontctxus1: Spam-Check-Result: No, hits=-96.1 required=6.0 tests=AWL, BAYES_99, USER_IN_WHITELIST autolearn=no version=2.60 Received: from unknown (HELO axiontech.com) (216.52.172.74) by 216.52.172.68 with SMTP; 21 Nov 2003 18:28:58 -0000 Received: (qmail 16082 invoked from network); 21 Nov 2003 18:28:58 -0000 Received: from pc-00132 (HELO yudie) (192.168.1.132) by mail.axiontech.com (192.168.1.6) with SMTP; 21 Nov 2003 18:28:58 -0000 Message-ID: <005201c3b05d$0cbb1460$8401a8c0@home.axiontech.com> From: "Yudie" To: References: <200311211422.PAA13790@rodos> <000f01c3b057$918a0210$8401a8c0@home.axiontech.com> <20031121175523.GA4065@wolff.to> Subject: Re: cast varchar to numeric/money Date: Fri, 21 Nov 2003 12:26:57 -0600 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200311/263 X-Sequence-Number: 16078 I don't have to_numeric function in my 7.2.2 postgre. then it can resolve it with: cast(substr(varcharcolumn,0) as float4) thanks. ----- Original Message ----- From: "Bruno Wolff III" To: "Yudie" Cc: Sent: Friday, November 21, 2003 11:55 AM Subject: Re: [SQL] cast varchar to numeric/money On Fri, Nov 21, 2003 at 11:47:42 -0600, Yudie wrote: > Hi guys, > > I know it's impossible to just cast varchar to any numeric datatype, > but is there another function/ custom function or any way to force to do > that convertion. You can use to_number to go from text to numeric.