1
I have a query below that the records that have nothing is coming with 0. I wish it could come blank. Example:
select
F.C37 [Pontuação],
ISNULL(count(distinct TD.UsuIDCliente),'-') [Qtde_Clientes Detratores],
ISNULL(count(distinct TN.UsuIDCliente),'-') [Qtde_Clientes Neutro],
ISNULL(count(distinct TP.UsuIDCliente),'-') [Qtde_Clientes Promotores]
from FRM_8 F
left join Tarefa TD on TD.TarID = F.TarefaID and F.C37 between 0 and 5 AND TD.TarFechamento between '01-07-2017' and '17-08-2017' -- Detratores
left join Tarefa TN on TN.TarID = F.TarefaID and F.C37 between 6 and 8 AND TN.TarFechamento between '01-07-2017' and '17-08-2017' --Neutro
left join Tarefa TP on TP.TarID = F.TarefaID and F.C37 between 9 and 10 AND TP.TarFechamento between '01-07-2017' and '17-08-2017' --Promotores
where
F.C38 is not null and F.C37 is not null
group by F.C37
order by
CASE F.C37 WHEN '1' THEN 0
WHEN '2' THEN 1
WHEN '3' THEN 2
WHEN '4' THEN 3
WHEN '5' THEN 4
WHEN '6' THEN 5
WHEN '7' THEN 6
WHEN '8' THEN 7
WHEN '9' THEN 8
WHEN '10' THEN 9
END
Today it’s coming that way:
Pontuacao Clientes Detratores Clientes Neutros
4 0 2
5 1 5
6 3 0
I want instead of coming 0, come NULL or blank.
as well "is coming with zero"?
– rLinhares
I edited the question. Hugs
– Renan Bessa