OK, Ive been staring at this one for an hour and can't see where my screw up is.
When I use this function to update a table I am getting the following error
ORA-06503: PL/SQL: Function returned without value
Any suggestions?
Thanks again guys!
Code:
CREATE OR REPLACE FUNCTION DW.f_e164_dj (v_call varchar )
RETURN NUMBER IS
v_COUNT NUMBER;
v_1 varchar2(1);
v_2 varchar2(2);
v_3 varchar2(3);
v_4 varchar2(4);
v_e164code varchar2(10);
v_short_code varchar2(30);
BEGIN
v_1 := substr(v_call,1,1);
v_2 := substr(v_call,1,2);
v_3 := substr(v_call,1,3);
v_4 := substr(v_call,1,4);
SELECT e164cd INTO v_e164code
FROM dw.lu_e164
WHERE e164cd IN (v_1, v_2, v_3, v_4);
exception
when others THEN v_e164code := null;
IF v_e164code is null THEN
v_e164code := 0;
END IF;
RETURN v_e164code;
END;
When I use this function to update a table I am getting the following error
ORA-06503: PL/SQL: Function returned without value
Any suggestions?
Thanks again guys!