Hi again I need to produce a script to input from the keyboard a month, and for all History records for that month, work out the number of nights each room was occupied and the occupancy rate for each room, for example 50% if room was occupied every other night. Also need to produce sub-totals for each category of room, and also for the hotel as a whole.
set serveroutput on format wrapped
set verify off
set feedback off
accept booking_Date_of_Arrival format A15 prompt "Given Month: "
select RoomNumber, Date_of_Arrival, , (DepartureDate- Date_of_Arrival) Time, (((DepartureDate - Date_of_Arrival)/31)*100) Rate, Number_of_Children, Number_of_Children
where Arrival =to_date(&MonthName)
set feedback on
set verify on
set serveroutput off
And all its doing now is coming up with the number 7 any ideas?