No acierto usando CASE.

From: Pablo Braulio <brulics(at)gmail(dot)com>
To: pgsql-es-ayuda(at)postgresql(dot)org
Subject: No acierto usando CASE.
Date: 2007-12-04 12:19:29
Message-ID: 475545D1.40200@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hola a todos.

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')...

Me da error.

Lo que intento hacer es que si el valor del cmapo instmant=I pues que me
muestre el texto "Instalación", de lo contrario que muestre "Mantenimiento".

¿Alguien me podría ayudar?.

Gracias a todos.

- --

< ¡¡Nos vemos!! >
----------------------------
\
\
.::!!!!!!!:.
.!!!!!:. .:!!!!!!!!!!!!
~~~~!!!!!!. .:!!!!!!!!!UWWW$$$
:$$NWX!!: .:!!!!!!XUWW$$$$$$$$$P
$$$$$##WX!: .<!!!!UW$$$$" $$$$$$$$#
$$$$$ $$$UX :!!UW$$$$$$$$$ 4$$$$$*
^$$$B $$$$\ $$$$$$$$$$$$ d$$R"
"*$bd$$$$ '*$$$$$$$$$$$o+#"
"""" """""""
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHVUXRK7lGsMchFswRAiWAAJ49hoWmz+H8j018Yz9rua13WZoIBACfYr5v
2kNTHYBGE/aoUa+TJ/b5Jco=
=TuMf
-----END PGP SIGNATURE-----

Responses

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Alvaro Herrera 2007-12-04 12:24:10 Re: No acierto usando CASE.
Previous Message Fabiola Fernández 2007-12-04 11:38:11 Re: Problemas para conectar a la base de datos con ESQL