datepart(year,GETDATE())=2015
Este getdate(), parece ser o teu problema.
Como tinha dito antes, tenta assim
where cp.idProduto is null and Ano=2015
↧