In your case you don't need to nest multiple CASE expressions.
SELECT AccessTabF1.Month, AccessTabF1.Year, AccessTabF1.[Entity Number],
case when [Exp Year] = 2010 + 1 -- why not = 2011 ?
then 'Expires in 1 to 5 Years' -- this does not match the logic on line above
when [Exp Year] > 2010 + 5 -- why not > 2015 ?
then 'Expires After 5 Years'
else 'No Expiration Year Listed'
end
from AccessTabF1
No comments:
Post a Comment