-
Hello All!
Is there any way I can create a view which can only access between 5am and 6 pm. During any other times, Nobody can access.
Please help !!!
Jung
:confused:
-
CREATE OR REPLACE VIEW emp_daily
AS
SELECT *
FROM emp
WHERE to_number(to_char(sysdate,'HH24')) BETWEEN 5 AND 17
-
Try
create view testit as
select * from dual
where sysdate between trunc(sysdate)+17/24 and trunc(sysdate)+18/24;
This will return rows during the specified time period, and no rows found at other times.
The drawback with this approach, is this: Does 'no rows found' mean that there is no data, or just that we are outside the specified time period.
It may help though.
HTH
David.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|