The tables are below
Hotel Table have
Hotel_id, hotel_name, Hotel_city, Hotel_state, Hotel_zip,Hotel_phone,
Reservation Table have
Reservation_id, Hotel_id, Room_num, Service_id, Guest_name, Reservation_start_date, Reservation_end_date, cancelation_date, Num_of_guest, event_type
Room Table have
Room_num, Hotel_id, Room_type, Room_capacity, Room_cost
service table have
service_id, Service_type, Service_cost
This is what i tried. the procedure compiled, and when i excute it it just say procedure successfully completed but i want my output to be the print statment(dbms statment). Im not even sure if my code is correct (fit the question). my code is below.
set serveroutput on; create or replace procedure change_event (Event_Name in VARCHAR2) IS cursor c1 is select Event_type, Hotel_name , Hotel_city,Hotel_state, Hotel_Zip , hotel_phone from reservation, Hotel where reservation.Hotel_id = hotel.hotel_id and event_type = event_name; R_row c1%rowtype; begin for R_row in c1 loop Dbms_output.put_line (R_row.event_type || ' '|| R_row.Hotel_name ||' , '|| R_row.Hotel_city || ' , '||R_row.Hotel_state||' '|| R_row.Hotel_Zip ||' , '|| R_row.hotel_phone ); end loop; end; exec change_event(' Birthday');