• Rather than using the Tally method have you considered using a CTE, the code below would work just as well and be a little more flexible.

    DECLARE @DateFrom as DateTime

    Declare @DateTo As DateTime

    Select @DateFrom = '01-Jan-2000', @DateTo='31-Dec-2010'

    ;WITH GetDateId(Id,MonthDate) AS

    (

    SELECT CAST(@DateFrom as Int) AS Id,@DateFrom DaysDate

    UNION ALL

    SELECT Id + 1,Cast(Id+1 as DATETIME) MonthDate

    FROM GetDateId gr

    Where Cast(Id as SmallDateTime) < @DateTo

    )

    SELECT

    MonthDate,

    Upper(Left(DateName(M,MonthDate),3))+'-'+Right(Year(MonthDate),2)

    FROM

    GetDateId

    WHERE MonthDate>=@DateFrom

    OPTION (MAXRECURSION 0);

    _________________________________________________________________________
    SSC Guide to Posting and Best Practices