I'm trying to use Case Statement for the following
SELECT .. to_number(nvl(il.var1,0)) * to_number(nvl(il.var2,0)) * to_number(nvl(il.var3,0))/1000000 AS calculated_value,
Sometimes, either var1 or var2 or var3 will have alphabets inside(dirty data) in which my query will return an error.
How do I structure my query with case statement in which if the result of the equation does not return me valid numeric or if var1 | var2| var3 is not integer, set calculated_value as "0" or "Empty" for that row only?
default n on conversion errorparameter toto_number.