• Because we know that the first Thursday of a month must be within 40 days of the selected date and must have a day number between 1 and 7, I can modify my original query with those parameters:

    DECLARE@SelectedDateDATE = '2012-02-02' --GETDATE()

    DECLARE@DesiredDayTINYINT = 5

    SELECTTOP 1 NextDay, DATENAME(WEEKDAY, NextDay) AS NameOfDay

    FROM(

    SELECTDATEADD(DAY, N, @SelectedDate) AS NextDay

    FROMTally

    WHEREN <= 40

    ) x

    WHEREDATEPART(WEEKDAY, NextDay) = @DesiredDay

    ANDDAY(NextDay) <= 7

    ORDER BY NextDay

    I think it is that easy. Let me know if I missed something.