Create or Replace FUNCTION Hello_Fun ( P_SCHEMA IN varchar2, P_OBJECT IN
varchar2) Return varchar2 IS
V_Hello Varchar2(400);
BEGIN
If User = 'Admin' then
V_Hello := '';
Else
V_Hello := 'cus_id in(select cus_id from employee where comp_id = NVL(SYS_CONTEXT('Hello_Context','COMP_ID'),0)');
END IF;
RETURN V_Hello;
END;
/
So the V_Hello:='cus_id..... is having compilation errors. Does it need quote delimiters or what is the issue:
LINE/COL ERROR
9/102 PLS-00103: Encountered the symbol "Hello_Context"
when expecting one of the following:
* & = - + ; < / > at in is mod remainder
not rem <an exponent (**)> <> or != or ~=
>= <= <> and or lik e LIKE2_ LIKE4_ LIKEC_ between
|| multiset member SUBMULTISET_