Question: Problem: Change a reservationDate: Input the reservation ID and change reservation start and end date, if there is availability in the same room type for

Problem: Change a reservationDate: Input the reservation ID and change reservation start and end date, if there is availability in the same room type for the new date interval.

I have attached images of my procedural code, and the output for the procedure and execute statements. I have also attached my select statement and results. I can't seem to figure out what the error is in my code isn't updating the record in the table reservation itself.

I am coding PL/SQL in Oracle SQL Developer.

Problem: Change a reservationDate: Input the reservation ID and change reservation start

set serveroutput on CREATE OR REPLACE PROCEDURE change_reservation_date (reservation_id IN varchar2, reserv_start_date IN date, reserv_end date IN date, room type IN varchar2) IS CURSOR reserv cursor IS SELECT reserv_start, reserv end FROM reservation WHERE reservation.room number - room type: reserv_row reserv_cursor rowtype: BEGIN OPEN reserv cursor LOOP FETCH reserv cursor INTO reserv row: EXIT WHEN reserv cursortnotfound; END LOOP: UPDATE reservation SET reserv start reserv start date WHERE reservation. reservation id-reservation id and (reservation. reserv end reserv_end_date) UPDATE reservation SET reserv end-reserv end date WHERE reservation. reservation-id reservation-id and (reservation. reserv end

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!