Hi ALL,
My below function returns BOLLEAN value.
CREATE OR REPLACE FUNCTION func_chk (
P_cde in NUMBER
)
RETURN BOOLEAN IS
t_val NUMBER := 0;
cursor c_ver IS
select 1
from tsertbl
WHERE cde=P_cde;
begin
open c_ver;
FETCH c_ver into t_val;
if c_ver%NOTFOUND then
RETURN false;
else
return true;
end if;
close c_ver;
END func_chk;
I am calling that function in a IF concondition of a procedure as
IF( v_val and not func_chk(p_sads))
I am getting some exeception is this correct way?
If the function not returning true then only my if condition should execute.
CREATE OR REPLACE PROCEDURE p1(p_sads NUMBER)
IS
v_val NUMBER;
BEGIN
IF( v_val and not func_chk(p_sads)) THEN
do somthing
END iF;
END;
Please help me.
Thanks