Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-28113: policy predicate has error

769952Aug 20 2010 — edited Aug 20 2010
I 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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 17 2010
Added on Aug 20 2010
10 comments
13,474 views