Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Best practice question: Updating Aggregates

Re: Best practice question: Updating Aggregates

From: <casey.kirkpatrick_at_gmail.com>
Date: 11 Oct 2005 12:07:56 -0700
Message-ID: <1129057676.753282.125790@o13g2000cwo.googlegroups.com>


Dan - sorry for the delay. I have to say - your response seems odd to say the least.

There are 100 rows which can be grouped into a total of 20 printable records. Given my goal (print the 20 records and update the 100 rows), what is the best practice for reliable, maintainable code?

Are you suggesting that for the 100 row table, I should BULK COLLECT 10 rows at a time (or whatever is most efficient), store the values of those 10 rows into a local array, update those 10 rows with a UPDATE FORALL statement, and then fetch the next 10 rows; etc? Then, after getting all 100 rows into this local array, I can write in PL/SQL all of the logic needed to group the data (all 100 rows) into the 20 printable records (perhaps in an aggregate local array?), and THEN loop through the aggregate array to print the grouped data?

If not - please, do explain your exact method for using BULK COLLECT to address the problem at hand. Received on Tue Oct 11 2005 - 14:07:56 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US