I don't know how I can do it without using 2 dimensional array and don't want to use pro-c.
I don't expect you to write codes just the approch should be enough if you can think of any other way. The only other way I can think of is creating x number of cursors and then inserting to the table.
Be aware of the limits of a pl/sql table(binary_integer):
Its magnitude range is -2**31 .. 2**31
Say start at 1
then store Id 1 in the range 1 - 53
Id 2 in the range 54 - 106
etc.
When you suppose you have more room
then make it easier
then store Id 1 in the range 1 - 99
Id 2 in the range 100 - 199
etc.
Now you can store the values as
my_plsql_table(IDx * 100 + weekx) := QTx;
week := mod(Index,100);
ID := floor(Index/100);
If the output-table is a physical table you have to
map every value to a column anyhow, so you can just do that immediate
and create a pl/sql-table as a output_table%rowtype
Bookmarks