Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: masking column values
chopras_at_gmail.com wrote:
> p1 and p2 are not any attributes. They represented arbitrary
> predicates in the example.
>
> For example the query could be
>
> select name, id, dept, sal
> from emp
> where (sal < 5000)
> union
> select name, id, dept, null
> from emp
> where (sal > 5000);
>
> The only point was that the predicates p1 and p2 do not act on the
same
> tuples.
>
> Additionally I cannot use VPD to solve this issue. Im wondering if a
> good solution exists using views.
>
> Thanks...
>
> Sandeep
Do you have the Oracle userid tied to the emp table in some way? If yes then why not use it to filter out everyone else except the logon user. You can get the current user by,
select username from v$session
where audsid = userenv('SESSIONID');
You can include a function call in your view that will return salary based on the logged on user.
Or is there more to your issue then I have interpreted.
Regards
/Rauf
Received on Fri Feb 11 2005 - 13:01:40 CST