I have two Oracle columns (in a VIEW, not a table) - DateOfBirth and MembershipDate. I am trying to create a new column that will show the age of the person on the date that they took up the membership.
Sample columns:
DateOfBirth: 01/05/1975
MembershipDate: 01/09/2015
AgeWhenBecameMemb: 40
How do I get the third column to get calculated on the fly, please?
I'm looking to implement it using something like this:
SELECT FLOOR(MONTHS_BETWEEN(DATE '2012-01-01', DATE '2010-10-10')/12) AS AgeWhenBecameMemb from DUAL
Thanks!