I want to set a holiday flag on a temp table if a date on my temp table(@Orig_Calendar) is in the holiday schedule. The following sql works fine.
UPDATE @Orig_Calendar
SET holiday = 1
WHERE orig_start IN (SELECT
holiday_date from HOLIDAY_SCHEDULE_DATES hsd, @Orig_Calendar oc
WHERE hsd.holiday_schedule_id = @holiday_sched)
HOWEVER, if the holiday falls on a Sunday, then I want to flag the following Monday instead of the Sunday on the temp table (@Orig_Calendar) if a following Monday exists. How can I do this?