I have a case statement that returns a date;
case when (ma.first_active_date is not null or ma.first_deemed_date is not null)
then (least(nvl(ma.first_active_date,sysdate),nvl(ma.first_deemed_date,sysdate)))
else (ma.status_date) end djf
How can i then calculate a count of years between the returned date and the sysdate?
You should be able to simply plug in your case statement into an expression, without the
djfalias, of course: