Dynamically obtain updated column values PL/SQL triggers [message #313106] |
Thu, 10 April 2008 14:12  |
pfeiam
Messages: 1 Registered: April 2008
|
Junior Member |
|
|
Hola,
New to this website and Oracle as well.
We have a table with more than 50 columns that are being consumed by different applications for user information. The data of these columns can be updated from the HR team, hence we created a transaction table which should be populated with only column names with old and new values for records that are modified.
I know in a update trigger I can code "if updating (column name) check", but this would be not maintenance friendly if the columns from the main table are either added or removed. I have got to a point where during an update I can iterate through all columns (colum names obtained from user_tab_cols table) and figure out which column was modified. But I'm stuck at trying to dynamically obtain :OLD.<modified_col_name> and :NEW.<modified_col_name> values in the trigger.
Any help will be truly appreciated.
Thanks
|
|
|
|