Question regard dates in Oracle database.
Date: 1996/03/20
Message-ID: <4injm4$3m6_at_spectator.cris.com>#1/1
Right now I have an application, which has a table which keeps schedule information. To put it simply, someone schedules something for a group for a time period during which only members of that group are allowed to access it. The schedule table looks like:
create table sched (
resource_id varchar2(60), s_group varchar2(30), begin_dt date, end_dt date
);
Then when someone wants to access a resource, I use the following code:
begin
select s_group into :grp from sched where resource_id = :resrc and
begin_dt <= sysdate and end_dt >= sysdate; if :grp != :mygroup then
<don't allow them access>
end if;
exception
when no_data_found then
null;
end;
Thanks in advance
Ken Denny
Insight Industries, Inc.
RTP, NC
#include <standard_disclaimer_regarding_opinions_etc>
Received on Wed Mar 20 1996 - 00:00:00 CET