Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: masking column values

Re: masking column values

From: Rauf Sarwar <rs_arwar_at_hotmail.com>
Date: 11 Feb 2005 11:01:40 -0800
Message-ID: <1108148500.853323.203150@l41g2000cwc.googlegroups.com>

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US