Author: Rohit Umarjikar
Posted: Fri Nov 18, 2016 2:32 am (GMT 5.5)
WITH UR in the Cursor should solve the problem.
If using UR, your program can be reading data that is in the process of being changed. It provides a high level of concurrency.
Another approach would be dump all the valid rows from the cursor to the GTT and in the update have a inner join with this GTT on key column(RACF_PRCS_INFO_ID ), So in one update query you will have all the work done instead of a traditional looping logic.
Please move this to DB2 section of the forum.
_________________
Regards,
Rohit Umarjikar
"Knowledge is knowing that a tomato is a fruit, but Wisdom is knowing not to put it in a fruit salad."![icon_razz.gif]()
Posted: Fri Nov 18, 2016 2:32 am (GMT 5.5)
Quote: |
Is there a way to query it while it's being updated and not caring that it's updated? |
If using UR, your program can be reading data that is in the process of being changed. It provides a high level of concurrency.
Another approach would be dump all the valid rows from the cursor to the GTT and in the update have a inner join with this GTT on key column(RACF_PRCS_INFO_ID ), So in one update query you will have all the work done instead of a traditional looping logic.
Please move this to DB2 section of the forum.
_________________
Regards,
Rohit Umarjikar
"Knowledge is knowing that a tomato is a fruit, but Wisdom is knowing not to put it in a fruit salad."
