Automatic update of DOB

Hello

I have a "date_of_birth" column in my table, and I also have a column 'age '.

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

But now I need the age calculated automatically DOB gets automatically stored in the column 'age '.

This age to calculate of DOB:

SELECT date_of_birth

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

USERS

WHERE USERNAME = v('APP_USER');

And if the connection of users the Colum "ages" should be automatically updated!

So, how I do it automatically stores the age in the column 'age '?

And what should be done to this column is updated?

Any help is appreciated.

THX

Hi Sozua,

So I created on the login of a process page after submit!

...

But when I use this

WHERE USERNAME =: APP_USER.

or this statement:

WHERE USERNAME = v('APP_USER');

his does not work?

This is because substitution integrated to Oracle APEX stations do not begin unless the user is authenticated and a valid session id is assigned to the user. This is why the chain of substitution APP_USER is set to zero in her sur-soumettre processes the login page when you call the logic of calculation of age.

Please create a application process of shooting the point on the new Instance (new session) with the code mentioned above for the calculation of the age.

And change it to a basic rule of comparison of strings in Oracle SQL:

WHERE UPPER(TRIM(USERNAME)) = UPPER(TRIM(:APP_USER));

NOTE: This process can also be called on before the header Header/After section of the rendering process Page of the homepage with the point on the new Instance (new session).

I hope this helps!

Kind regards

Kiran

Tags: Database

Similar Questions

Maybe you are looking for

  • Identifying modified by email but accidentally hurt apple spelled the new email

    I had an old apple with an email that is no longer able to access ID, so I wanted to change the e-mail address to my current e-mail address. When you type in my current e-mail I accidentally misspelled so now I can't access the account. I also tried

  • Satellite L300 has no internet connection wireless

    Hi all I can not connect to wireless internet on my Satellite L300. It is not a connection in the network connections window. I'm completely stuck. Any ideas? Thank you

  • Laptop HP 2000z: upgrade RAM on HP laptop 2000z

    Hello I recently bought a key of 8 GB of RAM DDR3 PC3-12800 laptop running 64-bit Windows 8.1.  It came with a 2 GB key at the retailer.  I tried running with just 8 GB key into the two slots, but the system wouldn't start.  However, when I re-instal

  • HDD SMART virus on my HP PC and lost my tab ACCESSORIES and restoration of the system.

    I have Vista pre-installed on my PC HP - has caught the virus in HDD SMART 2008, but it was removed. Now, I do my tab ACCESSORIES more and no longer have a point system - restore is just not there!  I get error code 08x004230F - something about a sha

  • No sound in media center

    It happened recently.  I am getting sound in WMP and QuickTime player but not Windows Media Center.  It will not read video files or live tv.  He plays good music.  I tried to configure the speakers, but that did not work. Anyone knows what is the ca