Ver Mensaje Individual
  #2 (permalink)  
Antiguo 29/07/2011, 09:06
Avatar de Libras
Libras
Colaborador
 
Fecha de Ingreso: agosto-2006
Ubicación: En la hermosa perla de occidente
Mensajes: 7.412
Antigüedad: 18 años
Puntos: 774
Respuesta: Duda sobre CASE

SELECT DISTINCT(cod_suc), COUNT(cat_dis) AS cant_venta_con ,
CASE WHEN cant_ventas_con is NULL THEN cant_ventas_con = 0 end as campo
from tabla


Saludos!
__________________
What does an execution plan say to t-sql query? Go f**k yourself, if you are not happy with me