Re: ayuda con sintaxis

From: "Jaime Casanova" <systemguards(at)gmail(dot)com>
To: "jeferson alvarez" <jalvarez(at)renova(dot)com(dot)pe>
Cc: pgsql-es-ayuda(at)postgresql(dot)org
Subject: Re: ayuda con sintaxis
Date: 2007-02-01 05:24:33
Message-ID: c2d9e70e0701312124x66dac3d4rcd547bf2c5b35d28@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

On 1/31/07, jeferson alvarez <jalvarez(at)renova(dot)com(dot)pe> wrote:
> Hola amigos este novato tiene el siguiente problemilla
>
> DECLARE cantidad INT4;
> IF cantidad>50 THEN
> select 'oo';
> ELSE
> select 'yy';
> END IF;
>
>
> ERROR: error de sintaxis en o cerca de «INT4» at character 18
>
> lop necesito con LANGUAGE 'sql'

en lenguaje 'sql'?

SELECT CASE WHEN cantidad > 50 THEN 'oo' ELSE 'yy' END;

--
Atentamente,
Jaime Casanova

"Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs and the universe trying
to produce bigger and better idiots.
So far, the universe is winning."
Richard Cook

In response to

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Jaime Casanova 2007-02-01 05:31:13 Re: Compilacion en AIX
Previous Message Jaime Casanova 2007-02-01 05:14:41 Re: Ayuda con una función