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
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
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: 9104
Registered: November 2002
Location: California, USA
Senior Member
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:59412348055
Previous Topic: how to compile a pl/sql package
Next Topic: IF-then instruction
Goto Forum:
  


Current Time: Tue Feb 11 18:49:32 CST 2025