sem,
I have a cursor of a table which has 1500 rows, which has one column that its value ranges from 1 to 8 (integer) but this value can increase to 30. The maximum value is obtained from another query.
I am doing a calculation on each row in the cursor, the result is saved to variable tmp.
Now I need to add the variable tmp with the array[number of query that return 1 to 8 as above].
i.e
if the column has a value of 3, I want to save the do (as in Java) array[3] = array[3] + tmp;
likewise if the column has a value of 7, array[7] = array[7] + tmp;
I do not have idea how to create and used the array in PL/SQL.
After all rows in the cursor are processed I must display the contents of the array.