Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Please help me - SQL - Urgent

Please help me - SQL - Urgent

From: Paul <paul_at_yeahright.com>
Date: 2000/05/12
Message-ID: <fOYS4.27$yY3.2354@news11-gui.server.ntli.net>#1/1

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 Fri May 12 2000 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US