Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Default where clause
There are a few possibilities.
The simplest approach probably:
Assuming that id TABLE_OWNER owns the table, create a view per user for all other users such as
for user1
create or replace view transact as
select * from table_owner.transact
where (department < 05 or department > 37);
for user2
create or replace view transact as
select * from table_owner.transact
where (department > 37 and account < "15000");
--
Jonathan Lewis
Yet another Oracle-related web site: www.jlcomp.demon.co.uk
Gorm Larsen wrote in message ...
>Is it possible to generate a standard where clause ?
>
>If I have a table "Transact" with the fields Account, Date, Amount
>and Department, and the user makes a statement like:
>
>select * from transact;
>
>I would like to change it to:
>
>select * from transact
>where (department < 05 or department > 37);
>
>without the user knowing anything about it.
>
>Another user may get this:
>select * from transact
>where (department > 37 and account < "15000");
>
>and so on.
>
>--
>Gorm Larsen
Received on Fri Mar 19 1999 - 12:16:37 CST
![]() |
![]() |