From: Martín Marqués <martin@bugs.unl.edu.ar>
To: pgsql sql Mailing List <pgsql-sql@postgresql.org>
Subject: case, new column not found
Date: Thu, 21 Jun 2001 20:02:21 +0300
Message-ID: <01062120022108.16528@bugs> (raw)
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
-----------------------------------------------------------------
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: martin@bugs.unl.edu.ar
Subject: Re: case, new column not found
In-Reply-To: <01062120022108.16528@bugs>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox