I have a query and I want to query in the form so that in the case of "null" or 0 I can replace them with 1.
select
ZEROIFNULL(SUM(CASE WHEN PROCEDURE_TYPE IN (816) and RAT_TYPE_NAME = '2G' THEN (COUNTER_THROUGHPUT_UL) END)) AS COUNTER_THROUGHPUT_UL_2G,
ZEROIFNULL(SUM(CASE WHEN PROCEDURE_TYPE IN (816) and RAT_TYPE_NAME = '3G' THEN (COUNTER_THROUGHPUT_UL) END)) AS COUNTER_THROUGHPUT_UL_3G,
ZEROIFNULL(SUM(CASE WHEN PROCEDURE_TYPE IN (816) and RAT_TYPE_NAME IN ('4G', 'LTE') THEN (COUNTER_THROUGHPUT_UL) END)) AS COUNTER_THROUGHPUT_UL_4G
from Table_name;
In this above query, there might be a possibility that result of all the column will null or zero and I need to replace them with 1. I used zeroifnull to convert all the null into 0 but can't find the way to convert 0 into 1.
I want to see all three columns as 1.