create view???
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: create view???

  1. #1
    Join Date
    Nov 2000
    Posts
    43

    Question

    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:

  2. #2
    Join Date
    Jul 2000
    Posts
    296
    CREATE OR REPLACE VIEW emp_daily
    AS
    SELECT *
    FROM emp
    WHERE to_number(to_char(sysdate,'HH24')) BETWEEN 5 AND 17

  3. #3
    Join Date
    Feb 2001
    Posts
    123
    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
  •  


Click Here to Expand Forum to Full Width