Skip to content
Advertisement

CASE Statement in WHERE Clause SQL Server

I’m having trouble sorting this out. I want to see the fiscal quarters for Date_Received. When the @ReviewPeriodQuarter = 1 then I want the Date_Received months 10,11,12. If @ReviewPeriodQuarter = 2 then I want the Date_Received months 1,2,3 etc. SQL Server doesn’t like the BETWEEN part of this. Thanks

Advertisement

Answer

You can either do it with more parameters like Larnu or you can use your original method but tweaked

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement