Hello,
I have been wrapping my head around this problem for sometime, and I know that someone can help me figure this out!
I have a large amount of reservations data for a hotel. The data table looks like this:
[TABLE="width: 710"]
<colgroup><col><col><col><col span="2"><col><col></colgroup><tbody>[TR]
[TD]Arrival Date[/TD]
[TD]Departure Date[/TD]
[TD]Rate Code[/TD]
[TD]Average LOS[/TD]
[TD]Room Nights[/TD]
[TD]Room Revenue (USD)[/TD]
[TD]ADR (USD)[/TD]
[/TR]
[TR]
[TD]Jan 1, 2014[/TD]
[TD]Jan 3, 2014[/TD]
[TD]TL[/TD]
[TD]2.0[/TD]
[TD]2[/TD]
[TD]$200[/TD]
[TD]$99.85[/TD]
[/TR]
[TR]
[TD]Jan 1, 2014[/TD]
[TD]Jan 2, 2014[/TD]
[TD]AD[/TD]
[TD]1.0[/TD]
[TD]1[/TD]
[TD]$112[/TD]
[TD]$111.59[/TD]
[/TR]
[TR]
[TD]Jan 1, 2014[/TD]
[TD]Jan 2, 2014[/TD]
[TD]T1[/TD]
[TD]1.0[/TD]
[TD]1[/TD]
[TD]$139[/TD]
[TD]$139.00[/TD]
[/TR]
[TR]
[TD]Jan 1, 2014[/TD]
[TD]Jan 2, 2014[/TD]
[TD]LV8[/TD]
[TD]1.0[/TD]
[TD]1[/TD]
[TD]$149[/TD]
[TD]$149.00[/TD]
[/TR]
[TR]
[TD]Jan 2, 2014[/TD]
[TD]Jan 3, 2014[/TD]
[TD]2G[/TD]
[TD]1.0[/TD]
[TD]2[/TD]
[TD]$258[/TD]
[TD]$129.00[/TD]
[/TR]
[TR]
[TD]Jan 2, 2014[/TD]
[TD]Jan 3, 2014[/TD]
[TD]CMP[/TD]
[TD]1.0[/TD]
[TD]1[/TD]
[TD]$1[/TD]
[TD]$1.00[/TD]
[/TR]
[TR]
[TD]Jan 2, 2014[/TD]
[TD]Jan 4, 2014[/TD]
[TD]I7[/TD]
[TD]2.0[/TD]
[TD]2[/TD]
[TD]$198[/TD]
[TD]$99.00[/TD]
[/TR]
[TR]
[TD]Jan 3, 2014[/TD]
[TD]Jan 5, 2014[/TD]
[TD]LV8[/TD]
[TD]2.0[/TD]
[TD]2[/TD]
[TD]$278[/TD]
[TD]$139.00[/TD]
[/TR]
[TR]
[TD]Jan 3, 2014[/TD]
[TD]Jan 4, 2014[/TD]
[TD]LV8[/TD]
[TD]1.0[/TD]
[TD]2[/TD]
[TD]$278[/TD]
[TD]$139.00
[/TD]
[/TR]
</tbody>[/TABLE]
Each row represents a reservation at a hotel. What I'm trying to do is convert this information from arrival date and departure date to represent stay date and then attribute the revenue appropriately. (LOS stands for 'Length of Stay').
The final product I'm trying to create is a report that shows the total number of rooms, average rate (ADR), and revenue for each rate code on a particular stay date.
I've been able to come up with some solutions that work, but they are extremely slow. My data table can be from 10,000 to 50,000 records and my solutions take several minutes to complete.
Please let me know if any one has any thoughts?
Thanks,
Chris
I have been wrapping my head around this problem for sometime, and I know that someone can help me figure this out!
I have a large amount of reservations data for a hotel. The data table looks like this:
[TABLE="width: 710"]
<colgroup><col><col><col><col span="2"><col><col></colgroup><tbody>[TR]
[TD]Arrival Date[/TD]
[TD]Departure Date[/TD]
[TD]Rate Code[/TD]
[TD]Average LOS[/TD]
[TD]Room Nights[/TD]
[TD]Room Revenue (USD)[/TD]
[TD]ADR (USD)[/TD]
[/TR]
[TR]
[TD]Jan 1, 2014[/TD]
[TD]Jan 3, 2014[/TD]
[TD]TL[/TD]
[TD]2.0[/TD]
[TD]2[/TD]
[TD]$200[/TD]
[TD]$99.85[/TD]
[/TR]
[TR]
[TD]Jan 1, 2014[/TD]
[TD]Jan 2, 2014[/TD]
[TD]AD[/TD]
[TD]1.0[/TD]
[TD]1[/TD]
[TD]$112[/TD]
[TD]$111.59[/TD]
[/TR]
[TR]
[TD]Jan 1, 2014[/TD]
[TD]Jan 2, 2014[/TD]
[TD]T1[/TD]
[TD]1.0[/TD]
[TD]1[/TD]
[TD]$139[/TD]
[TD]$139.00[/TD]
[/TR]
[TR]
[TD]Jan 1, 2014[/TD]
[TD]Jan 2, 2014[/TD]
[TD]LV8[/TD]
[TD]1.0[/TD]
[TD]1[/TD]
[TD]$149[/TD]
[TD]$149.00[/TD]
[/TR]
[TR]
[TD]Jan 2, 2014[/TD]
[TD]Jan 3, 2014[/TD]
[TD]2G[/TD]
[TD]1.0[/TD]
[TD]2[/TD]
[TD]$258[/TD]
[TD]$129.00[/TD]
[/TR]
[TR]
[TD]Jan 2, 2014[/TD]
[TD]Jan 3, 2014[/TD]
[TD]CMP[/TD]
[TD]1.0[/TD]
[TD]1[/TD]
[TD]$1[/TD]
[TD]$1.00[/TD]
[/TR]
[TR]
[TD]Jan 2, 2014[/TD]
[TD]Jan 4, 2014[/TD]
[TD]I7[/TD]
[TD]2.0[/TD]
[TD]2[/TD]
[TD]$198[/TD]
[TD]$99.00[/TD]
[/TR]
[TR]
[TD]Jan 3, 2014[/TD]
[TD]Jan 5, 2014[/TD]
[TD]LV8[/TD]
[TD]2.0[/TD]
[TD]2[/TD]
[TD]$278[/TD]
[TD]$139.00[/TD]
[/TR]
[TR]
[TD]Jan 3, 2014[/TD]
[TD]Jan 4, 2014[/TD]
[TD]LV8[/TD]
[TD]1.0[/TD]
[TD]2[/TD]
[TD]$278[/TD]
[TD]$139.00
[/TD]
[/TR]
</tbody>[/TABLE]
Each row represents a reservation at a hotel. What I'm trying to do is convert this information from arrival date and departure date to represent stay date and then attribute the revenue appropriately. (LOS stands for 'Length of Stay').
The final product I'm trying to create is a report that shows the total number of rooms, average rate (ADR), and revenue for each rate code on a particular stay date.
I've been able to come up with some solutions that work, but they are extremely slow. My data table can be from 10,000 to 50,000 records and my solutions take several minutes to complete.
Please let me know if any one has any thoughts?
Thanks,
Chris