我必须在某个日期(样本日期)之前设置至少3天的提醒日期。如果该日期设置为周二或周三,则提醒日期将设置为周六和周日发送。我想把提醒日期提前4天设置为周二,周三提前5天。这样,我所有的提醒都会在一周内发送出去。我考虑过将dateadd与case语句一起使用,但不确定如何在datedd函数中合并某些工作日。select dateadd (day,-3,convert(char(10),sample_date,101)) as Reminder_Sent
-- Ideally, my query should