Home » SQL & PL/SQL » SQL & PL/SQL » Dynamically obtain updated column values PL/SQL triggers (Oracle 11g)
Dynamically obtain updated column values PL/SQL triggers [message #313106] Thu, 10 April 2008 14:12 Go to next message
Messages: 1
Registered: April 2008
Junior Member

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.

Re: Dynamically obtain updated column values PL/SQL triggers [message #313132 is a reply to message #313106] Thu, 10 April 2008 16:25 Go to previous message
Barbara Boehmer
Messages: 8737
Registered: November 2002
Location: California, USA
Senior Member
Previous Topic: how to compile a pl/sql package
Next Topic: IF-then instruction
Goto Forum:

Current Time: Fri Aug 18 02:02:42 CDT 2017

Total time taken to generate the page: 0.13314 seconds