15.24 MOVE_MEMBER_UP Procedure
Adjusts the sequence ID of specified member in the given named collection up by one (add one), swapping sequence ID with the one it is replacing. For example, 2 becomes 3 and 3 becomes 2.
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 occurs.
If the member specified by sequence ID p_seq
does not exist, an application error occurs.
If the member specified by sequence ID p_seq
is the highest sequence in the collection, an application error is not returned.
Syntax
APEX_COLLECTION.MOVE_MEMBER_UP (
p_collection_name IN VARCHAR2,
p_seq IN NUMBER )
Parameters
Parameter | Description |
---|---|
p_collection_name |
The name of the collection. Maximum length is 255 bytes. Collection names are not case sensitive and are converted to upper case. An error is returned if this collection does not exist with the specified name of the current user in the same session. |
p_seq |
Identifies the sequence number of the collection member to be moved up by one. |
Example
This example moves a member of the EMPLOYEES
collection up one position. After executing this example, sequence ID 5
becomes sequence ID 6
and sequence ID 6
becomes sequence ID 5
.
BEGIN
APEX_COLLECTION.MOVE_MEMBER_UP(
p_collection_name => 'EMPLOYEES',
p_seq => '5' );
END;
Parent topic: APEX_COLLECTION