Received: from bugs.unl.edu.ar (bugs.unl.edu.ar [168.96.132.208]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f5LN23a11808 for ; Thu, 21 Jun 2001 19:02:04 -0400 (EDT) (envelope-from martin@bugs.unl.edu.ar) Received: by bugs.unl.edu.ar (Postfix, from userid 1004) id E44F12AB3A; Thu, 21 Jun 2001 20:02:22 +0300 (GMT) Content-Type: text/plain; charset="iso-8859-1" From: =?iso-8859-1?q?Mart=EDn=20Marqu=E9s?= To: pgsql sql Mailing List Subject: case, new column not found Date: Thu, 21 Jun 2001 20:02:21 +0300 X-Mailer: KMail [version 1.2] MIME-Version: 1.0 Message-Id: <01062120022108.16528@bugs> Content-Transfer-Encoding: 8bit X-Archive-Number: 200106/343 X-Sequence-Number: 3630 I'm trying somethings here and I get strange errors: select *,( (CASE WHEN titulo LIKE '%Matematica%' THEN 1 ELSE 0 END) + (CASE WHEN descripcion LIKE '%Matematica%' THEN 1 ELSE 0 END) + (CASE WHEN incumbencia LIKE '%Matematica%' THEN 1 ELSE 0 END) ) AS encontrados FROM admin_view WHERE admin_view.nivel=1 AND encontrados > 0; ERROR: Attribute 'encontrados' not found Why is it? encontrados should be an attribute of type INT with the count of the rows found. Any ideas? Saludos... :-) -- Cualquiera administra un NT. Ese es el problema, que cualquiera administre. ----------------------------------------------------------------- Martin Marques | mmarques@unl.edu.ar Programador, Administrador | Centro de Telematica Universidad Nacional del Litoral -----------------------------------------------------------------