Re: Llenar con valores en una consulta SQL

From: "Jaime Casanova" <systemguards(at)gmail(dot)com>
To: Hensa <hensa22(at)yahoo(dot)es>
Cc: "Grover Navia" <grover8navia(at)yahoo(dot)es>, pgsql-es-ayuda(at)postgresql(dot)org
Subject: Re: Llenar con valores en una consulta SQL
Date: 2006-10-12 05:07:53
Message-ID: c2d9e70e0610112207k3142850ahd45651f1e72c52e9@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

On 10/11/06, Hensa <hensa22(at)yahoo(dot)es> wrote:
> Intenta con esto
>
> SELECT D.cod, D.producto, case when U.cantidadUno is null then 0 else U.cantidadUno end as Cantidad
> FROM tablaDos As D LEFT JOIN tablaUno As U ON D.cod = U.cod
>

en este caso es lo mismo que usar coalesce

--
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 2006-10-12 05:26:50 Re: buena noches
Previous Message Leonel Nunez 2006-10-12 01:31:41 Re: Recomendar libros de PostgreSQL