• Just in case, IF you already have an index on ( YearValue, MonthValue ), then this should be extremely fast:

    SELECT

    MAX(YearValue) AS YearValue, MAX(MonthValue) AS MonthValue --or some computation to turn this into a datetime

    FROM dbo.myTable

    WHERE

    YearValue = ( SELECT MAX(YearValue) FROM dbo.myTable )

    SQL DBA,SQL Server MVP(07, 08, 09) A socialist is someone who will give you the shirt off *someone else's* back.