What you want is to use the
AGE column with in the query after where ..... but i much i know (Already searched a lot few months ago) it's not possible ...
If you want to preserve the result for a while use
CTE(Common Table Expression) ...
Or you have to write the Case scenario ..
Quote:
CASE
WHEN (MONTH(GETDATE()) * 100) + DAY(GETDATE()) >= (MONTH(Employees.BirthDate) * 100) + DAY(Employees.BirthDate)
THEN DATEDIFF(Year, Employees.BirthDate, GETDATE())
ELSE DATEDIFF(Year, Employees.BirthDate, GETDATE())-1
Once again within
WHERE clouse ...