Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Please help me - SQL - Urgent
Write a before insert trigger
Winnie
Paul wrote in message ...
>Im trying to create a trigger for the table below (It has to be a trigger):
>SQL> DESC BOOKING
> Name Null? Type
> ------------------------------- -------- ----
> PATIENT_NO VARCHAR2(6)
> ROOM_NO NUMBER(3)
> RESV_DATE DATE
> PTO_DATE DATE
>
>What i want to do is ensure that when I try to insert a row that has dates
>that fall between or on the RESV_DATE and PTO_DATE of an already existing
>row (these are a booking start and end date) the insertion is rejected.
>Ive tried my best over and over and cannot seem to achieve it. I am at the
>end of my teather :( Please help an sql newbie out.
>Thanks
>Paul
>
>
>
Received on Sat May 13 2000 - 00:00:00 CDT
![]() |
![]() |