Contar cero cuando no exista registro indicado
Hola colegas, estuve pensando como hacer un conteo en cero cuando no halla registro alguno en la tabla desde un SELECT, expongo ejemplo:
Tengo el siguiente Query condicionado:
SELECT Column1, COUNT(Column2) AS Qty FROM TablaA WHERE Column1 IN ('A','B','C') GROUP BY Column1;
digamos que si tengo en mi tabla varios registros a y b el, pero no tengo ninguno de c, la vista me lanza esto:
Column1--Qty
a---------5
b---------9
Que necesito cambiar para que aparezcan todos lo datos condicionados aun que no halla algún registro de ellos en tabla ,algo asi:
Column1--Qty
a---------5
b---------9
c---------0
Subject
Views
Written By
Posted
Contar cero cuando no exista registro indicado
3702
July 04, 2014 06:12PM
1698
July 04, 2014 11:11PM
1329
July 05, 2014 12:04AM
1412
July 05, 2014 10:12AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.