Re: Collection Sorting
From: dombrooks <dombrooks_at_hotmail.com>
Date: Thu, 15 Mar 2012 02:23:55 -0700 (PDT)
Message-ID: <32580918.4735.1331803435817.JavaMail.geo-discussion-forums_at_vblb5>
A collection should always be in sorted order according to its index key.
Date: Thu, 15 Mar 2012 02:23:55 -0700 (PDT)
Message-ID: <32580918.4735.1331803435817.JavaMail.geo-discussion-forums_at_vblb5>
A collection should always be in sorted order according to its index key.
If you want to sort differently, then it depends on what collection type you're using.
And what collection type you use depends on what you need to do with it.
If I'm using a collection as a rowsource - i.e. going to use it in SQL - then the only option really is to use a SQL object type (as opposed to PLSQL), using the TABLE() function and then you can use an ORDER BY like any other rowsource.
There other options.
See Adrian Billington's article on sorting collections:
http://www.oracle-developer.net/display.php?id=428
Received on Thu Mar 15 2012 - 04:23:55 CDT