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.

    Requires Free Membership to View

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

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
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
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: