I have a SQL Server query that filters some data using:
and datepart(mm,cs.timestamp) <= @month
I have a parameter @accumulate that if true then I want to to above logic but if false then I want to do:
and datepart(mm,cs.timestamp) = @month
Any clue on how to that in same line?