sql server - T-SQL : Get Current + Previous years from date table -
i have year values 2009 2015 in date table. want years min(year) current(year).
how can achieve this?
thank you
just select thouse "smaller or equal" current year
select * table datepart(year, date) <= datepart(year, getdate())