I need to check in my SELECT whether the e.DataTrm field is between 30 and 90 days from today's date. How to make condition in CASE?
SELECT
e.NmrCnt AS [Contrato]
,e.NmrSerie AS [Serie]
,e.DataAfr AS [Data Aferição]
,e.DataTrm AS [Data Término]
,CASE
WHEN e.DataTrm < GETDATE() THEN 'Vencida'
WHEN CONDIÇÃO THEN 'Vence em 30 à 90 dias'
END AS [Status]
FROM
tbl_Eqp e