X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id EBD41D9842 for ; Fri, 14 Oct 2005 15:09:19 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 58573-10 for ; Fri, 14 Oct 2005 18:08:58 +0000 (GMT) Received: from CORREO.correolux.com.mx (customer-200-79-53-218.uninet-ide.com.mx [200.79.53.218]) by svr1.postgresql.org (Postfix) with ESMTP id 0C111D9A55 for ; Fri, 14 Oct 2005 15:08:44 -0300 (ADT) Received: from 192.168.7.58 ([192.168.7.58]) by correolux.com.mx with MailEnable ESMTP; Fri, 14 Oct 2005 13:14:55 -0600 Subject: cast From: Judith Altamirano Figueroa To: pgsql-sql@postgresql.org Content-Type: text/plain Date: Fri, 14 Oct 2005 13:08:43 -0500 Message-Id: <1129313323.4577.55.camel@Desarrollo> Mime-Version: 1.0 X-Mailer: Evolution 2.0.2 (2.0.2-3) Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.052 required=5 tests=[AWL=0.002, FORGED_RCVD_HELO=0.05] X-Spam-Level: X-Archive-Number: 200510/172 X-Sequence-Number: 23025 Hello I have a query that ran in 7.0.2, but in 8.0.1 does not, the query is the next: select n.factura, n.venta_neta, c.nombre_cli || ' ' || c.apellido_pat_cli || ' ' || coalesce (c.apellido_mat_cli,''), date(n.fecha_hora_factura), o.nombre_oft from nota_venta n, clientes c, oft_central o where date(n.fecha_hora_factura) >= '2005-10-01' and date(n.fecha_hora_factura) <= '2005-10-14' and n.id_cliente = c.id_cliente and cast(n.udf4 as integer) = o.id_oft_central and n.factura is not null and n.s_factura != 'T' order by o.nombre_oft"; it aparently returns an error because the cast, but I need to do the cast, does somebody knows how can I change the cast but with the same result, thnks!!!!