7 Replies Latest reply on Sep 15, 2017 9:02 PM by indy2005

    How to iterate over all rows in an IG for processing PL/SQL Code, even if no changes are made

    indy2005

      Hi,

       

      I have a use case where I need to present data in an IG from one table and let the user make choices in a column (adding a Yes/No value).

       

      But this is not the table I need to update.  I actually need to iterate over all elements in the IG and based on the selections made, do inserts or updates into a completely different table.

       

      A user may or may not have made any changes in the IG, but I still need to process each row and perform an insert or an update.

       

      The problem is, my PL/SQL code is only running for changed rows, and I want to iterate over every row in the IG and take action based on the values, and depdendent on whether I can find data in related tables.

       

      How can you iterate on a SAVE action, over all rows in the IG and take appropriate action, regardless of an insert, delete or update action.  In fact I am not allowing deletes or inserts, only updates - I am just returning data from a view, marking one column with a drop down value of Yes/No with a default of Yes.  They may or may not have made a choice, I still need to work with each row to determine an action.

       

      I am also getting "non preserved key column issues"....

       

      In summary

       

      1) IG returns data, from a view which does not need updating, with a column which can be selectable as Yes/No

      2) IG has custom PL/SQL code to save the IG, which needs to iterate over each item - regardless of whether it was changed or not, and take action against other tables not related to the IG source

       

      Regards


      Stephen