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!

Audit information and user id management

Padmocho-OracleMar 16 2006 — edited Mar 16 2006
Hi Experts,

I am trying to build a simple audit region for my application which would record changes like:

Created by:
Created on:

The way I would go about this would be to use a BEFORE INSERT trigger with something like:
new.created_by := nvl(wwv_flow.g_user,user).

However, my tasks table has a column named CREATED_BY which is NUMBER column and its FK to TASK_USERS table. This means that when the above trigger fires it will try to insert a username into a number column... and ofcourse fail.

Is there a way to create somekind of LOV for a trigger? What I would like to achive is that a username will be automatically converted to the user ID and that would be inserted into CREATED_BY (NUMBER) column...

Or does anyway has other ideas?

Thanks for any help,
Pawel.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 13 2006
Added on Mar 16 2006
2 comments
554 views