Pablo Braulio escribió:
> No he usado mucho CASE en un select, por lo que no doy correctamente con
> la sintaxis.
>
> Si pongo en un select esto:
... CASE WHEN instmant='I' THEN 'Instalación' ELSE 'Mantenimiento' END ...
Te falta el END, y no necesitas parentesis.
--
Alvaro Herrera http://www.PlanetPostgreSQL.org/
"Now I have my system running, not a byte was off the shelf;
It rarely breaks and when it does I fix the code myself.
It's stable, clean and elegant, and lightning fast as well,
And it doesn't cost a nickel, so Bill Gates can go to hell."