This is part of a big query.
What I’m trying to do is, if the variable @exemptionStartDate = '1900-01-01', then just select everything,
ie. ce.ExemptionStartDate = ce.ExemptionStartDate.
Otherwise, I only want rows where ce.ExemptionStartDate > @exemptionStartDate
ce.ExemptionStartDate is of DateTime value
SELECT foobar
WHERE foo = bar
AND ce.ExemptionStartDate = CASE WHEN @exemptionStartDate = '1900-01-01' THEN ce.ExemptionStartDate ELSE (> @exemptionStartDate) END
is it possible? Or will I have to do the hacky thing of making everything a long string, and just adding onto it as necessary?
I’m getting a syntax error, and don’t know how to form such a thing.
not need to complicate matters
and then it is just