In a view I want to get an amount when the month is less than or equal to 3 (march).
The following code is not accepted, but I don't know why:
CASE MONTH(dbo.gbkmut.date) WHEN <=3 THEN amount ELSE 0 END AS 'YTD_03_Mar'
If I change it to "WHEN 3" it works, but only for March.
Can someone give me a hint over how to achieve the amount when the month is less than or equal to March?
Thanks,
Frans
The following code is not accepted, but I don't know why:
CASE MONTH(dbo.gbkmut.date) WHEN <=3 THEN amount ELSE 0 END AS 'YTD_03_Mar'
If I change it to "WHEN 3" it works, but only for March.
Can someone give me a hint over how to achieve the amount when the month is less than or equal to March?
Thanks,
Frans