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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Default where clause

Re: Default where clause

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Fri, 19 Mar 1999 18:16:37 -0000
Message-ID: <921867569.18944.0.nnrp-11.9e984b29@news.demon.co.uk>


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

Original text of this message

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