Hi, I have a sql 2008 view and I 'm trying to get the last 4 months of information considering the current year and month ,this means Jan,Dec,Nov and Oct, when the current month will be feb the result must be feb,jan,dec,nov etc how can I get this?
This is the code I have but this dont shows me Jan 2016
SELECT Año, Mes, DNr, DName, Cost, ST, T, Qty, RNr, RName
WHERE (Mes >= Month(DATEADD(MM, - 3, GETDATE())))
Thanks in advance