Re: ayuda SQL con CASE

From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: Alexander Aguilar Torrico <alex(at)glisc(dot)org>
Cc: pgsql-es-ayuda(at)postgresql(dot)org
Subject: Re: ayuda SQL con CASE
Date: 2004-07-02 15:30:19
Message-ID: 20040702153019.GD25348@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

On Fri, Jul 02, 2004 at 10:07:37AM -0400, Alexander Aguilar Torrico wrote:

> SELECT id,descripcion,(CASE tipo
> WHEN 1 THEN 'Artefato'
> WHEN 2 THEN 'Artefato'
> WHEN 3 THEN 'Artefato'
> WHEN 4 THEN 'Artefato'
> WHEN 5 THEN 'Artefato'
> ELSE 'Equipo de oficina'
> END) AS TIPO_PRODUCTO
> FROM activos;

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"¿Que diferencia tiene para los muertos, los huérfanos, y aquellos que han
perdido su hogar, si la loca destrucción ha sido realizada bajo el nombre
del totalitarismo o del santo nombre de la libertad y la democracia?" (Gandhi)

In response to

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Mario Soto 2004-07-02 15:58:52 Re: una pregunta tecnica
Previous Message Edwin Quijada 2004-07-02 15:25:00 Re: ayuda SQL con CASE