11g,
Hi there,
Have an issue that I am struggling with
I have a query which returns counts based on some condition
{code}
select Type , nvl(cnt,0) from (
select 'type' Type, count(t.status) cnt from table1 t
where active = 'Y'
and code = 1
group by 'type')
{code}
However, if no records exist, I get no data found What I want as the output is
Type Cnt
type 0
So if no data exists, still show me type and 0
Am I doing anything wrong?
Thanks,
ryan