SELECT plan, begindate FROM mytable WHERE begindate IN ( SELECT TOP 3 begindate FROM mytable ORDER BY begindate DESC) UNION ALL SELECT MAX(plan) + 1, CAST(Null AS D) FROM mytable ORDER BY begindate DESC>Yep, I was hoping to bypass the stored procedure route, but it looks as though it's the only way.