ORA-28113: policy predicate has error
769952Aug 20 2010 — edited Aug 20 2010I am trying to apply a policy predicate to a table to restrict the columns users see when executing a select query. I have created the context and can select from it using DUAL in a SQL session, the package to create the predicate is as follows
CREATE OR REPLACE PACKAGE BODY XYZ
AS
function ABC(D1 varchar2,D2 Varchar2)
Return Varchar2 IS
d_predicate varchar2(2000);
v_value varchar2(1) := 'Y';
BEGIN
d_predicate := 'SYS_CONTEXT("MY_CONTEXT","MY_VALUE") = v_value';
RETURN d_predicate;
END ABC;
END XYZ;
Each time I select from the table I get the error above, can anyone see the problem?
Thanks in advance
Tina