Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Calculating years of experience using YEAR( )

775110Jul 1 2010 — edited Jul 1 2010
Hi all,

I am trying to calculate the years of experience for every employee in a company. Ideally, I hope the system will update the years of experiece every year without hardcoding.

For example, instead of:

Select 2010 - emp.start_year
from emp

I want to use:

Select YEAR(GETDATE()) - emp.start_year
from emp

However, apex gave me an error saying "YEAR" is not a valid identifier.

What's wrong and how do I fix that?

Thank you very much for the help!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 29 2010
Added on Jul 1 2010
7 comments
3,912 views