X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id E28E1D1BB29 for ; Wed, 20 Aug 2003 09:24:44 -0300 (ADT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 34836-03 for ; Wed, 20 Aug 2003 09:24:33 -0300 (ADT) Received: from host2.hostseguro.com (unknown [200.198.188.133]) by svr1.postgresql.org (Postfix) with ESMTP id 4E64DD1B9E1 for ; Wed, 20 Aug 2003 09:24:29 -0300 (ADT) Received: from cpanel by host2.hostseguro.com with local (Exim 4.20) id 19pS0q-0000gV-R2 for pgsql-admin@postgresql.org; Wed, 20 Aug 2003 09:24:28 -0300 Received: from 200.180.188.226 ([200.180.188.226]) by sistemica.info (IMP) with HTTP for ; Wed, 20 Aug 2003 09:24:28 -0300 Message-ID: <1061382268.3f43687cc3565@sistemica.info> Date: Wed, 20 Aug 2003 09:24:28 -0300 From: Rhaoni Chiu Pereira To: Lista PostgreSQL Subject: Explicit Cast MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.2.1 X-Originating-IP: 200.180.188.226 X-MailScanner-Information: Verificado pelo McAfee VirusScan / Scanned by McAfee VirusScan X-MailScanner: Nao infectado / Found to be clean X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - host2.hostseguro.com X-AntiAbuse: Original Domain - postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [32001 32001] / [47 12] X-AntiAbuse: Sender Address Domain - sistemica.info X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/210 X-Sequence-Number: 9931 Hi List, As I already said .. I'm porting an Oracle DB to PostgreSQL and I must rewrite most of the functions . So I have a problem to do something like this: ... atual_fatura in(''+'',''-'') ... It gives me the following error: Unable to identify an operator '-' for types 'numeric' and 'character varying' You will have to retype this query using an explicit castenciosamente, atual_fatura is a varchar field. I read howto create an explicit cast but I didn't understand what I must do in this case. Can anybody help me ? Rhaoni Chiu Pereira Sistêmica Computadores Visite-nos na Web: http://sistemica.info Fone/Fax : +55 51 3328 1122