client-room procedure wip
This commit is contained in:
parent
e0e6491d94
commit
7508f2f7cf
|
@ -35,4 +35,20 @@ BEGIN
|
||||||
LOOP
|
LOOP
|
||||||
DBMS_OUTPUT.PUT_LINE(booking.BOOKINGID);
|
DBMS_OUTPUT.PUT_LINE(booking.BOOKINGID);
|
||||||
END LOOP;
|
END LOOP;
|
||||||
END;
|
END;
|
||||||
|
|
||||||
|
create or replace procedure rooms(clientz in number, months in number)
|
||||||
|
|
||||||
|
is
|
||||||
|
startMonth date;
|
||||||
|
begin
|
||||||
|
startMonth := add_months(sysdate, months);
|
||||||
|
|
||||||
|
select br.ROOMNUMBER
|
||||||
|
from BOOKINGROOM br inner join (
|
||||||
|
select *
|
||||||
|
from BOOKING inner join CLIENT
|
||||||
|
on BOOKING.CLIENTID = CLIENT.PERSONID
|
||||||
|
where CLIENT.PERSONID = clientz and BOOKING.ARRIVALDATE >= startMonth
|
||||||
|
) bookings on br.BOOKINGID = bookings.BOOKINGID;
|
||||||
|
end rooms;
|
||||||
|
|
Loading…
Reference in a new issue