rss
twitter
facebook

Home

SQL generate Years <=100

WITH ListYear AS
     ( SELECT 1913 AS YEAR
             UNION ALL
        SELECT lyear.YEAR + 1 AS YEAR
        FROM ListYear lyear
        WHERE lyear.YEAR + 1 <= YEAR(GetDate())
     )
SELECT YEAR FROM ListYear ORDER BY YEAR DESC;

0 comentários:

 
Powered by Blogger