<html><div style='background-color:'><DIV class=RTE>
<P>coalesce es lo mismo que nvl de oracle no?<BR><BR></P></DIV>
<DIV></DIV>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #a0c6e5 2px solid; MARGIN-RIGHT: 0px"><FONT style="FONT-SIZE: 11px; FONT-FAMILY: tahoma,sans-serif">
<HR color=#a0c6e5 SIZE=1>
<DIV></DIV>From: <I>"Jaime Casanova" <systemguards(at)gmail(dot)com></I><BR>To: <I>"Javier Estévez CIFA Córdoba" <javier(dot)estevez(dot)ext(at)juntadeandalucia(dot)es></I><BR>CC: <I>pgsql-es-ayuda(at)postgresql(dot)org</I><BR>Subject: <I>Re: [pgsql-es-ayuda] COUNT</I><BR>Date: <I>Mon, 27 Feb 2006 03:35:00 -0500</I><BR>>On 2/27/06, Javier Estévez CIFA Córdoba<BR>><javier(dot)estevez(dot)ext(at)juntadeandalucia(dot)es> wrote:<BR>> > Es posible que al realizar un count(*) me devuelva el valor 0 cuando<BR>> > corresponda?<BR>> ><BR>> > Cómo puedo hacerlo?<BR>> ><BR>> > Gracias. Javier Estévez<BR>> ><BR>><BR>>estas pensando en sum...<BR>>count siempre regresa un valor numerico >= 0<BR>><BR>>respecto a tu pregunta...
seria<BR>><BR>>select coalesce(sum(campo), 0) from tabla<BR>><BR>>--<BR>>Atentamente,<BR>>Jaime Casanova<BR>><BR>>"What they (MySQL) lose in usability, they gain back in benchmarks, and that's<BR>>all that matters: getting the wrong answer really fast."<BR>> Randal L. Schwartz<BR>><BR>>---------------------------(fin del mensaje)---------------------------<BR>>TIP 3: si publicas/lees desde Usenet, por favor envía "subscribe-nomail"<BR>> a majordomo(at)postgresql(dot)org para que tus mensajes puedan llegar<BR>> a los suscriptores de la lista<BR></FONT></BLOCKQUOTE></div><br clear=all><hr>Charla
con tus amigos en línea mediante MSN Messenger: <a href="http://g.msn.com/8HMAES/2728??PS=47575" target="_top">Haz clic aquí</a> </html>