sp_backfill_revenue_room_net


Description

Fills revenue_room_net on room_summary, recapitulate, guest_history and rsv_pickup for any row that still has NULL, optionally limited to a date window. Idempotent – every statement filters on IS NULL, so re-running costs one empty pass.

V20260916.10.2 already backfills inline, so this is not needed for a normal upgrade. Reach for it when a property is restored from a pre-migration dump, or when a data fix means a date range should be recomputed – clear the columns for those dates first, then call it with the window.

Parameters

Name Type Mode
p_from date IN (DEFAULT NULL)
p_to date IN (DEFAULT NULL)

Definition