Problem solve Get help with specific problems with your technologies, process and projects.

Sorting an array

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 last published in March 2004

Dig Deeper on Using Oracle PL-SQL

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.