I have to retrieve 2 fields in this query (number of projects and the management that performs such a project). This query is going to be used to generate a report in JASPER and it does not display field with NULL
value, so I want to for every null
in column f.br_nome_ger_executo
the query return "manage not informed". This query is working, but it displays null
in the query response.
select count(i.is_active) NUMERO_PROJETOS,
case f.br_nome_ger_executo
when null then 'Gerencia nao informada'
else f.br_nome_ger_executo end as GERENCIA_EXECUTORA
from inv_investments i
join odf_ca_project f on i.id = f.id and i.is_active = 1
group by f.br_nome_ger_executo
I did a test with the acronym of one of the managements and it returns the text correctly.
Thanks for the help.