We need to retrieve the code that defines a trigger. Not just the code of the trigger(systriggers.action_statement) but the full create statement.
I think we have all the elements except for the list of columns in the UPDATE OF clause.
This information can be retrieved as follows:
SELECT TRIGGERED_UPDATE_COLUMNS FROM QSYS2.SYSTRIGUPD where EVENT_OBJECT_SCHEMA
= '%s' and EVENT_OBJECT_TABLE='%s' and TRIGGER_NAME='%s'
What we need to do is create a function accepting 3 parameters Table Library, Table Name, Trigger Name and will return a comma delimited list of the triggered update columns based on the query above. If the query returns no rows, the function should return ''. The function will be called within the SQL statement retrieving the Triggers.
Can anyone assist me in writing this function?
May 8, 2006 3:01 PM
May 10, 2006 11:35 AM