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: Can i restrict user to query database table after office time....

Re: Can i restrict user to query database table after office time....

From: <fitzjarrell_at_cox.net>
Date: 29 Dec 2004 08:52:44 -0800
Message-ID: <1104339164.506824.213800@c13g2000cwb.googlegroups.com>

Chris Spierings wrote:
> "Gaurav" <gb4u09_at_yahoo.com> wrote in message
> news:67040838.0412290422.456bc348_at_posting.google.com...
> > HI group,
> > I have doubt, can i restrict user to query database table after
office
> > time....
> > Please suggestme solution...is solution possible in single query
> > Please mailme at gb4u09_at_yahoo.com...
>
> There may be better ways but you could always resrtict them through a
view
>
> create or replace view v1
> as select * from my table
> where to_char(sysdate,'HH24') between 8 and 17;
>
> I haven't tried but you may also be able to make a trigger that
raised an
> error if the wrong user selected at the wrong time.
>
> There's probably some built in feature for this that I haven't heard
of
> anyway!

I believe you meant this:

create or replace view v1
as select * from my_table
where to_char(sysdate,'HH24') between '18' and '23' or to_char(sysdate, 'HH24') between '00' and '07';

to cover non-office hours, which is the original request from the OP. David Fitzjarrell Received on Wed Dec 29 2004 - 10:52:44 CST

Original text of this message

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