Is there an easy way to sort a PL/SQL table (i.e. array)? I'm storing memberIDs and dollars accrued and need to write a file showing each member and their total account balance. I'm populating the PL/SQL table from three different cursors (can't combine into one), and wanted to sort the table by member to do the summing of accrued dollars.
Not really. However, starting with Oracle8i you can use something called GLOBAL Temporary Table. You can specify whether to preserve or delete the rows on commit.
The advantage is that the data in GLOBAL Temporary Table is available only during the session and you can even index the global temporary table and sort it using normal select statements.
This was first published in March 2004
Join the conversationComment
Share
Comments
Results
Contribute to the conversation