However, you still have the issue of a Cartesian join between the input table (not used in your sample) and the holidays table. Also, performance may...
Hi Jeff, You got me! The reason is obvious: number - NULL = NULL. Here is the fix: -- Comment in/out as needed for testing --DECLARE @BegDate DATETIME = '20000701',...