[Pgsql-ayuda] Diferencias en querys
felipe.molina
felipe.molina@inegi.gob.mx
29 Oct 2003 11:46:54 -0700
Que tal lista:
Una disculpa por el correo donde preguntaba acerca de XIMIAN me
equivoque de lista.
Al ejecutar el siguiente query :
select count(*) as totalinst_confefund from (select idinstit from
cuestxinst where estatus = 2) as c left join institucionunidad as i on
(i.padrevocal = c.idinstit and i.padrevocal <> i.idinstit and funest =
0);
me retorna 882
y al ejecutar este otro query:
select count(*) as fe_es_null from (select idinstit from cuestxinst
where estatus = 2) as c left join institucionunidad as i on (c.idinstit
= i.padrevocal and i.idinstit<>i.padrevocal ) where funest = 0;
me retorna 880
Segun yo deberia de retornar lo mismo.
El resultado correcto es el segundo. Por que sera?
Saludos y de antemano muchas gracias