Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)

  • RE: SQL Server 2008 T-SQL Enhancements Part - III

    Thanks for the article, makes me look forward to our upcoming migration from 2000 to 2008.

    However, I have to ask why you would actually try to use recursion for the...

  • RE: To Find the First Saturday of any month

    Thanks for the catch on the negative numbers. I've added a 14 day offset to ensure the code always lands in the current month. Works for every day...

  • RE: To Find the First Saturday of any month

    declare @DayToFind tinyint, @AnyDayInAMonth datetime

    select @DayToFind = 1, --Monday

    @AnyDayInAMonth = '2009-04-15'--Target month

    select dateadd(day, (datepart(d, @AnyDayInAMonth) - datepart(dw, @AnyDayInAMonth) - @@datefirst + @DayToFind) % 7, dateadd(day, 1-datepart(d, @AnyDayInAMonth), @AnyDayInAMonth))

    Seems like a...

Viewing 3 posts - 1 through 3 (of 3 total)