I wrote the following statement to trying to take to calculate the employee's age and return a value of N if under 21 else Y but it isn't working. Can someone tell me what I am doing wrong?
In advanced, Thank you
Tee
SELECT
person_ID,
date_of_birth,
case when trunc((sysdate - date_of_birth) / 365) <21 'N' else 'Y' end
FROM per_all_people_f
In advanced, Thank you
Tee
SELECT
person_ID,
date_of_birth,
case when trunc((sysdate - date_of_birth) / 365) <21 'N' else 'Y' end
FROM per_all_people_f