Hello Guys,
I can create simple views for MYSQL Database tables but I am unsure on how to create a view for the following requirement:
- I want to create a view which restricts staff user access to a specific table between working hours of 13:00 - 14:00.
I have been told that this can be implemented via the sysdate function. Any ideas on how I would do this?
All help is well appreciated!
Thank You!
Software/Hardware used:
ASKED:
March 26, 2012 8:58 PM
UPDATED:
March 27, 2012 12:44 PM
U may use vpd policy to overcome this issue / grant users access to a view…. try this small lines of codes !
create view <viewname> as
select * from <tablename>
where (to_char(sysdate,’HH24MI’) between ’1300′ and ’1400′
or user = ‘<username>’
);
Be cautious about syntax / single quote etc….
Plz see here an idea on the same from MYSQL