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!

Automatically update DOB

SozuaMar 17 2015 — edited Mar 18 2015

Hi

I have in my table a Colum „date_of_birth “, and also I have a Colum “age”.

Now if the users register they chooses the DOB in a date picker field and this DOB is than stored in the table after they click button to register.

But now I need that the automatically calculated Age from DOB gets automatically stored in the Colum “age”.

This calculate age from DOB:

SELECT  date_of_birth,

TRUNC(MONTHS_BETWEEN(sysdate, dob)/12) age_user

FROM users

WHERE USERNAME = v('APP_USER');

And if the Users login the Colum “age” should be automatically updated!

So how can I do that it automatically stores the age in the Colum “age”?

And what should be done that this Colum gets updated?

Any help is appreciated.

thx

This post has been answered by Kiran Pawar on Mar 18 2015
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 15 2015
Added on Mar 17 2015
4 comments
390 views