Question : no display for null column

i try not to display those rows which contain null in the column 'modetype'.
Code Snippet:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
select * from (
select modetype,received_qty, case when totalqty = 0 then 0 
else (cast((calc_value/ totalqty) * 100 as number(5,2))) end as percentage
from (
select vital_dashboard_mv.modetype, vital_dashboard_mv.received_qty, 
vital_dashboard_mv.received_qty as calc_value,
(SELECT sum(received_qty) from vital_dashboard_mv) totalqty
from vital_dashboard_mv where vital_dashboard_mv.period = 4
group by modetype, received_qty
)
union all
(
select 'Total', sum(vital_dashboard_mv.received_qty), null
from vital_dashboard_mv where vital_dashboard_mv.period = 4
 )
 ) order by modetype

Answer : no display for null column

Attempting to put that into your code ...
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
select * from (
select modetype,received_qty, case when totalqty = 0 then 0 
else (cast((calc_value/ totalqty) * 100 as number(5,2))) end as percentage
from (
select vital_dashboard_mv.modetype, vital_dashboard_mv.received_qty, 
vital_dashboard_mv.received_qty as calc_value,
(SELECT sum(received_qty) from vital_dashboard_mv) totalqty
from vital_dashboard_mv where vital_dashboard_mv.period = 4
 AND modetype IS NOT NULL
group by modetype, received_qty
)
union all
(
select 'Total', sum(vital_dashboard_mv.received_qty), null
from vital_dashboard_mv where vital_dashboard_mv.period = 4
 )
 ) order by modetype
Random Solutions  
 
programming4us programming4us