function错误
昨天下班的时候,测试爆出一个错误:
问题出在下面这个functions的第九行:
CALCNPV functions:CREATE OR REPLACE FUNCTION "GAOFEI"."CALCNPV"(monthFv in number, recoveryExp in number, monthTime in number, irr in number) RETURN number IS netRec number;BEGIN if monthFv is null or recoveryExp is null or monthTime is null or irr is null or monthTime > 1395 then return null; end if; netRec := ISNULL_NUMBER(monthFv, 0) * (1 - ISNULL_NUMBER(recoveryExp, 0)); return netRec / power (1 + ISNULL_NUMBER(irr, 0), ISNULL_NUMBER(monthTime, 0) / 12);END;