hi all,
we have a requirement to capture the specific column update of a table into another table(log table). i have already found that TRIGGERS can be used to achieve this requirement, but i wanted to know if same can be done using PROCEDURES. Also among TRIGGER and PROCEDURE ,which method is best suitable to achieve this. The important points in the requirement are as below:
1) The details to be captured are field name which is updated, old value,new value ,person responsible, date of update and time.
2) The above details should be captured automatically.i.e there should not be calling of the procedure after each time the field is updated, rather on the update of the field ,the details should automatically be captured in another table.
3) The fields of the table for which we need to capture the value changes will be maintained in a table(say config table), and the procedure should log the changes only for the fields are maintained in config table. example- say my table has 100 fields and i want to capture the changes for only 5 specific fields which i will maintain in a table ,later on i wanted to capture the changes of 2 more fields ,so i will just add those 2 fields in the table and the procedure should be able to capture changes for those 2 fields also. same case when i no longer want to capture changes for a field then i will remove it from config table and the procedure should not capture changes for that field anymore.
4) we should not call the procedure manually every time the fields gets updated. instead it should get triggered automatically.
please let me know your views.