Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

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

indy2005Sep 10 2017 — edited Sep 15 2017

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

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 13 2017
Added on Sep 10 2017
7 comments
4,075 views