Consulta

From: "Rodrigo Barahona" <rbarahona(at)maestra(dot)cl>
To: <pgsql-es-ayuda(at)postgresql(dot)org>
Subject: Consulta
Date: 2005-12-01 18:53:00
Message-ID: 20051201174938.71850479C8B@mail.maestra.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

Estuve buscando en los manuales y no encontre nada.

Tengo el siguiente select

select into monto_stock sum(cantidad) from pedido_bodega where id_empresa =
idempresa;

funciona bien si encuentro un registro en la tabla que pertenezca a
id_empresa pero si no sum(cantidad) me devuelve NULL. Como puedo interpretar
este NULL como un 0, recuerdo que en orcacle existia un NVL(sum(cantidad),0)
existe algo asi en postgres..

saludos

Responses

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Tom Lane 2005-12-01 18:57:33 Re: 15,000 tables
Previous Message Gavin M. Roy 2005-12-01 18:49:43 Re: 15,000 tables