Previous |
Next |
Use this procedure to reorder the members of a given collection by the column number specified by p_sort_on_column_number. This will sort the collection by a particular column/attribute in the collection and reassign the sequence IDs of each number such that no gaps exist. If a collection does not exist with the specified name for the current user in the same session and for the current Application ID, an application error will be raised.
Syntax
APEX_COLLECTION.SORT_MEMBERS ( p_collection_name IN VARCHAR2, p_sort_on_column_number IN NUMBER);
Parameters
Table: SORT_MEMBERS Parameters describes the parameters available in the SORT_MEMBERS
procedure.
SORT_MEMBERS Parameters
Parameter | Description |
---|---|
|
The name of the collection to sort. An error is returned if this collection does not exist with the specified name of the current user and in the same session. |
|
The column number used to sort the collection. |
Example
In this example, column 2 of the DEPARTMENTS
collection is the department location. The collection is reorder according to the department location.
BEGIN; APEX_COLLECTION.SORT_MEMBERS ( p_collection_name => 'DEPARTMENTS', p_sort_on_column_number => '2'; END;